reidmorrison / symmetric-encryption

Symmetric Encryption for Ruby Projects using OpenSSL
https://logger.rocketjob.github.io/
Apache License 2.0
476 stars 92 forks source link

Upgrading v3 to v4 when using rails #147

Closed dorongutman closed 3 years ago

dorongutman commented 3 years ago

I'm using symmetric-encryption version 3.7.1 in rails. We don't call SymmetricEncryption.decrypt or SymmetricEncryption.encrypt or any direct call to SymmetricEncryption at all. We only use it as part of rails' active record with mongoid.

So is it true the only thing I need to do is to make sure the ciphers section in the symmetric-enncryption.yaml file has encoding: :base64strict (as opposed to to :base64), and to add always_add_header: false?

reidmorrison commented 3 years ago

According to the readme, the defaults have changed, so only set the values if they are not already set in your yaml file. Since encoding is already :base64 I would not change it. Just add always_add_header: false.