Closed kmmndr closed 1 year ago
Hi @kmmndr, key_table
needs to be passed to previous_versions
as well.
class Event
has_encrypted :description, key_table: 'messages', previous_versions: [{master_key: previous_key, key_table: 'messages'}]
end
It should probably use the top-level value if none is specified, but that'll be a breaking change, so would need to wait until 2.0.
Added to the 2.0 plan (#155).
Hi @ankane :-)
Thank you very much for Lockbox, it is a great gem !
I'm trying to rotate encryption key. But it raises exception for custom fields having
key_table
attribute.How to reproduce:
Set a
previous_key
In this example Messages descriptions are readable but accessing Events descriptions raise
Lockbox::DecryptionError: Decryption failed
error.