I was using attr_encrypted (1.3.3) in rails 4.1 in User model with following details
attr_encrypted :email, :key => 'some_key'
After upgrading the application to rails 6 attr_encrypted bumped to attr_encrypted (3.1.0) which uses encryptor (~> 3.0.0)
in the encryptor (~> 3.0.0) new validation has been introduced
raise ArgumentError.new("key must be #{cipher.key_len} bytes or longer") if options[:key].bytesize < cipher.key_len
which raises ArgumentError (key must be 32 bytes or longer)
exception for my existing key
How can I attr_encrypted gem with rails 6 without breaking user functionality?