Sha256: 65d442c4c364bad4d4050df250ff1a4487894f47fa6264c87bac9ea3162d8748
Contents?: true
Size: 554 Bytes
Versions: 9
Compression:
Stored size: 554 Bytes
Contents
module Rmega module Crypto module AesCtr def aes_ctr_cipher OpenSSL::Cipher::AES.new(128, :CTR) end def aes_ctr_decrypt(key, data, iv) cipher = aes_ctr_cipher cipher.decrypt cipher.iv = iv cipher.key = key return cipher.update(data) + cipher.final end def aes_ctr_encrypt(key, data, iv) cipher = aes_ctr_cipher cipher.encrypt cipher.iv = iv cipher.key = key return cipher.update(data) + cipher.final end end end end
Version data entries
9 entries across 9 versions & 1 rubygems