|
| __construct ($name, $attributes=null) |
| Constructor - instantiates a encrypted_final_element, specifying its basic info.
|
|
| add_attributes ($attributes) |
|
| annotate ($backupid) |
| This function implements the annotation of the current value associating it with $itemname.
|
|
| clean_value () |
|
| clean_values () |
|
| destroy () |
| Destroy all circular references.
|
|
| get_attribute ($name) |
|
| get_attributes () |
| Public API starts here.
|
|
| get_level () |
|
| get_name () |
| Public API starts here.
|
|
| get_parent () |
|
| get_value () |
|
| is_set () |
|
| process ($processor) |
| This function will call to the corresponding processor method in other to make them perform the desired tasks.
|
|
| set_annotation_item ($itemname) |
| This function sets the $itemname to be used when annotating.
|
|
| set_value ($value) |
| Set the value of the field.
|
|
| to_string ($showvalue=false) |
|
Implementation of backup_final_element that provides symmetric-key AES-256 encryption of contents.
This final element transparently encrypts, for secure storage and transport, any content that shouldn't be shown normally in plain text. Usually, passwords or keys that cannot use hashing algorithms, although potentially can encrypt any content. All information is encoded using base64.
Features:
- requires openssl extension to work. Without it contents are completely omitted.
- automatically creates an appropriate default key for the site and stores it into backup_encryptkey config (bas64 encoded).
- uses a different appropriate init vector for every operation, which is transmited with the encrypted contents.
- all generated data is base64 encoded for safe transmission.
- automatically adds "encrypted" attribute for easier detection.
- implements HMAC for providing integrity.
- Copyright
- 2017 onwards Eloy Lafuente (stronk7)
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later