Answer the question
In order to leave comments, you need to log in
How to rewrite PHP openssl_decrypt to Ruby?
Dear PHP experts, please help me rewrite this code in Ruby using openssl.
openssl_decrypt($encrypted, "aes-256-cbc", $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv)
Answer the question
In order to leave comments, you need to log in
In my case, besides
cipher = OpenSSL::Cipher::AES256.new(:CBC)
cipher.decrypt
cipher.key = "..."
cipher.iv = "..."
cipher.reset
immediately after processing the next block with cipher.update
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question