Fix decryption IV

This commit is contained in:
Justin Collins
2020-03-18 09:07:28 -07:00
parent 70d41440c4
commit 7e25fd0f6c
2 changed files with 25 additions and 1 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ module Encryption
aes = OpenSSL::Cipher.new(cipher_type)
aes.decrypt
aes.key = key[0..31]
aes.iv = iv[0.15] if iv != nil
aes.iv = iv[0..15] if iv != nil
decoded = Base64.strict_decode64("#{val}")
aes.update("#{decoded}") + aes.final
end