Interestings
- jRuby OpenSSL behavior different than MRI
Our project was having trouble converting from MRI 1.9.3 to JRuby. We’re using OpenSSL to decrypt a string, which worked fine in MRI. However in JRuby the same code raised the error ” OpenSSL::Cipher::CipherError:
Given final block not properly padded”.
We discovered that OpenSSL on jRuby is stricter and you must set an initialization vector, e.g. cipher.iv = “