Hi all,
Consider the following scenario:
- System has some sensitive data stored in DB
- This sensitive data is encrypted using aes_encrypt, and then saved to DB
- aes key changes
- Sensitive data is gone :S
How about creating a hook_aes_key_change (better naming is welcome, this is just to explain the idea). This hook would provide both the old key, and the new key, and who this key belongs to. This would allow us to decrypt, and then re-encrypt the data with the new key. Thus avoiding losing the data.
Feedback?
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | interdiff-1415550-10-11.txt | 2.24 KB | andriyun |
| #14 | add_change_hook-1415550-11.patch | 4.79 KB | andriyun |
| #11 | add_change_hook-1415550-10.patch | 3.58 KB | andriyun |
Comments
Comment #1
dpovshed commentedWill be implemented in 8.x
Comment #2
andriyun commentedPatch for 7.x
Comment #3
andriyun commentedComment #4
andriyun commentedComment #5
andriyun commentedComment #6
andriyun commentedComment #7
andriyun commentedComment #8
andriyun commentedComment #9
podarokplease, make it fit coding standards for 80 symbols per line.
All other looks good.
Comment #10
andriyun commentedComment #11
andriyun commentedComment #12
podarokComment #13
podarokformatting please
Comment #14
andriyun commentedComment #16
dpovshed commentedFunctionality is implemented and committed for Drupal 7. Drupal 8 version is in progress.
Comment #17
andriyun commented