Displaying 1 result from an estimated 1 matches for "encrypted_data".
2009 Feb 26
11
OpenSSL::Cipher decrypt returns 'wrong final block length'
...ted through a form before saving
it to the DB. And then decrypt it again when I need to retrieve and
use it.
Im trying to use the OpenSSL::Cipher library. I have the following
module for encryption/decryption
[code]
require ''openssl''
module AESCrypt
# Decrypts a block of data (encrypted_data) given an encryption key
# and an initialization vector (iv). Keys, iv''s, and the data
# returned are all binary strings. Cipher_type should be
# "AES-256-CBC", "AES-256-ECB", or any of the cipher types
# supported by OpenSSL. Pass nil for the iv if the encry...