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
jruby 9.2.6.0 (2.5.3) 2019-02-11 15ba00b OpenJDK 64-Bit Server VM 11.0.2+9 on 11.0.2+9 +jit [darwin-x86_64]
Darwin Kelleys-MBP.neo.rr.com 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
Expected Behavior
OpenSSL::Cipher.new('aes-256-ctr') should not require cipher.final for streaming ciphers
Actual Behavior
It requires cipher.final to get the trailing bytes
Sample script
require'openssl'require'securerandom'# String which will have 4 trailing bytesstring='a'.b*20cipher=OpenSSL::Cipher.new('aes-256-ctr')cipher.iv=SecureRandom.random_bytes(16)cipher.key=SecureRandom.random_bytes(32)# str should be 20 bytes longputscipher.update(string).size# In MRI# => 20# In JRuby# => 16
The text was updated successfully, but these errors were encountered:
I misfiled this in jruby so I'm refiling it here as a more appropriate place.
Environment
Provide at least:
Expected Behavior
OpenSSL::Cipher.new('aes-256-ctr')
should not requirecipher.final
for streaming ciphersActual Behavior
cipher.final
to get the trailing bytesSample script
The text was updated successfully, but these errors were encountered: