Upgrading from attr_encrypted and Vault-rails for same key

孤街醉人 提交于 2019-12-13 06:31:06

问题


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.

来源:https://stackoverflow.com/questions/53498689/upgrading-from-attr-encrypted-and-vault-rails-for-same-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!