Upgrading from attr_encrypted and Vault-rails for same key

117 views Asked by At

I was using attr_encrypted mechanism previously,

attr_encrypted :ssn, key: :encryption_key, algorithm: 'bf-cfb', mode: :single_iv_and_salt, insecure_mode: true

and I upgraded it to vault-rails:

include Vault::EncryptedModel
vault_attribute :ssn

I want to keep both in a way that, if some data is already saved using attr_encrypted then use that, and use vault for new user or if any old user is updating their data.

0

There are 0 answers