Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArgumentError: data must not be empty #33

Open
MattSmithASU opened this issue Dec 11, 2018 · 1 comment
Open

ArgumentError: data must not be empty #33

MattSmithASU opened this issue Dec 11, 2018 · 1 comment

Comments

@MattSmithASU
Copy link

When upgrading the gem from version 1.1.3 to 3.0.0 (or 2.0.0), I get the error:
"ArgumentError: data must not be empty" on a Encryptor.decrypt call
I'm calling the decrypt method with the same value as before (iv is 12 bytes instead of 16).
dcrypted_value = Encryptor.decrypt unpacked, :key => the_key, :iv => the_iv, :salt => the_salt

@Jorgelina1983
Copy link

@MattSmithASU I just figured that with this upgrade the default algorithm changed from aes-256-cbc to aes-256-gcm. So in order to use the decrypt with old data you will need to send the following options insecure_mode: true, algorithm: 'aes-256-cbc'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants