ig-crypto-utils/lib/ig-crypto-utils.rb
# use this to generate a random (base64 encoded) AES key if required
use this to generate a random (base64 encoded) AES key if required
use this to generate a random ( base64 encoded ) AES key if required
def decrypt(encoded_cipher_text, encoded_key, encoded_iv)
      decoded_cipher_text = Base64.decode64 encoded_cipher_text
      decoded_iv = Base64.decode64 encoded_iv
      cipher = OpenSSL::Cipher::AES.new(256, :CBC)
      cipher.decrypt
      cipher.key = encoded_key
      cipher.iv = decoded_iv
      cipher.update(decoded_cipher_text) + cipher.final
    end
def decrypt ( encoded_cipher_text , encoded_key , encoded_iv ) decoded_cipher_text = Base64 . decode64 encoded_cipher_text decoded_iv = Base64 . decode64 encoded_iv cipher = OpenSSL :: Cipher :: AES . new ( 256 , :CBC ) cipher . decrypt cipher . key = encoded_key cipher . iv = decoded_iv cipher . update ( decoded_cipher_text ) + cipher . final end
use this to generate a random (base64 encoded) AES key if required
use this to generate a random ( base64 encoded ) AES key if required
encoded_cipher_text
<not_specific>
encoded_key
<not_specific>
encoded_iv
<not_specific>