Skip to content

AES Legacy Migration Instructions

Justin Mazzi edited this page Apr 21, 2014 · 13 revisions

There are some breaking changes in the new versions of the encryptors. As a result data must be migrated to the new encryptors. CryptKeeper now includes a utility to migrate this data. Please backup all data before using this tool.

crypt_keeper --old-key 'old key' --new-key 'hey there' --salt 'delicious' --table-name 'secrets' --columns 'password,location' --old-encryptor aes

After you migrate your data, add the new crypt_keeper line model using the new encryptors:

class MyModel < ActiveRecord::Base
  crypt_keeper :password, :location, encryptor: :aes_new, key: 'hey there', salt: 'delicious'
end