reidmorrison / symmetric-encryption

Symmetric Encryption for Ruby Projects using OpenSSL

Home Page:https://logger.rocketjob.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrading v3 to v4 when using rails

dorongutman opened this issue · comments

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?

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.