Implementation of the general encryption algorithm AES using OpenSSL as backend.
Since OpenSSL is a native Ruby extension (that comes bundled with Ruby) it is much faster than the pure Ruby version and it can use the AES-NI instruction set on CPUs when available.
This implementation is using AES in Cipher Block Chaining (CBC) mode.
See: PDF1.7 s7.6.2
Public Class Methods
Creates a new
FastAES object using the given encryption key and initialization vector.
The mode must either be :encrypt or :decrypt.
Uses OpenSSL to generate the requested random bytes.
See AES::ClassMethods#random_bytes for more information.
Public Instance Methods
Encrypts or decrypts the given data whose length must be a multiple of 16.