You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
OpenSSL::Cipher::CipherError after upgrade to v3.0 #207
@saghaulor just upgraded from v2.0.
Your lib always breaks my app.
Reacted by Zac Stewart, Dawei Hu, Brad Werth, hirokihokari, Bolo Michelin, Wagner Santos, Arthur Nogueira Neves, Ángel M, Tim Lange, Chris Mullins and 18 more
Reacted by Zac Stewart, Michael Coyne, Brad Werth, andrew morton, Ёkaterina Krivich , Jesper Rønn-Jensen, Bolo Michelin, Simon Taranto, Talha Meh, Tyler Oswalt and 7 more
Reacted by Saad Shakil, Tim Fletcher, Tyler Oswalt and Jonathan Zisser
@saghaulor I've just started a new project with attr_encrypted version 3 and I've received the same error at the very top of this thread.
I'm using this with active record. I had an issue before where it said it needed an IV as well but the issue is a pretty simple fix. Like it says in the notes you need a 256 bit secret key! :-)
It could. You didn't have to upgrade to the new version of the gem if the repercussions of the bump weren't worth addressing. You can lock a version of the gem to a specific major version in your gemfile.
It is not up to the developer of the gem to account for the almost infinite edge cases that invariably arise.
Reacted by Toby Osbourn, Stephen Aghaulor, Lachlan Priest and Dan Kozlowski
Activity
saghaulor commentedon Mar 30, 2016
@Ewg777 Did you just start using attr_encrypted or did you just recently upgrade?
Ewg777 commentedon Mar 30, 2016
@saghaulor just upgraded from v2.0.
Your lib always breaks my app.
saghaulor commentedon Mar 30, 2016
@Ewg777 There were breaking changes between the major releases, hence the major version bumps. You're welcome to use a different lib. Additionally, you're welcome to read the readme. Let me help you: https://github.com/attr-encrypted/attr_encrypted#upgrading-from-attr_encrypted-v2x-to-v3x
Ewg777 commentedon Mar 30, 2016
@saghaulor it'll be great to add this to release notes. Thanks
theleanoptimizer commentedon Apr 1, 2017
@saghaulor I've just started a new project with attr_encrypted version 3 and I've received the same error at the very top of this thread.
I'm using this with active record. I had an issue before where it said it needed an IV as well but the issue is a pretty simple fix. Like it says in the notes you need a 256 bit secret key! :-)
Here's an example I found on creating one:
secret_key = Digest::SHA256.hexdigest('a secret key')Perhaps you could add an example in the notes on creating the 256 bit secret key?
szymonbaranowski commentedon Jun 5, 2018
@ryanj77 Im afraid such secret key will cause
ArgumentError: key must be 32 bytesin the Ruby 2.4gbuchanan-snap commentedon Aug 21, 2018
Maybe we need to do a little Lunch 'n Learn session here:
Semantic Versioning gives a developer enough context to know when a version bump is probably going to break your app.
Ewg777 commentedon Aug 22, 2018
@gbuchanan-snap a version bump shouldn't break the data of the app, should it?
gbuchanan-snap commentedon Aug 22, 2018
It could. You didn't have to upgrade to the new version of the gem if the repercussions of the bump weren't worth addressing. You can lock a version of the gem to a specific major version in your gemfile.
It is not up to the developer of the gem to account for the almost infinite edge cases that invariably arise.
mPanasiewicz commentedon Apr 23, 2019
In my case, the same error when
scret_key_basewas damaged.