#include <crypto_asdcp.h>
Inheritance diagram for AESEncrypt:
Public Member Functions | |
bool | SetKey (size_t KeySize, const UInt8 *Key) |
Set an encryption key. | |
bool | SetIV (size_t IVSize, const UInt8 *IV, bool Force=false) |
Set an encryption Initialization Vector. | |
DataChunkPtr | GetIV (void) |
Get the Initialization Vector that will be used for the next encryption. | |
bool | CanEncryptInPlace (size_t BlockSize=0) |
Can this encryption system safely encrypt in place? | |
bool | EncryptInPlace (size_t Size, UInt8 *Data) |
Encrypt data bytes in place. | |
DataChunkPtr | Encrypt (size_t Size, const UInt8 *Data) |
Encrypt data and return in a new buffer. | |
Protected Attributes | |
AES_KEY | CurrentKey |
UInt8 | CurrentIV [16] |
bool SetKey | ( | size_t | KeySize, | |
const UInt8 * | Key | |||
) | [inline, virtual] |
bool SetIV | ( | size_t | IVSize, | |
const UInt8 * | IV, | |||
bool | Force = false | |||
) | [inline, virtual] |
Set an encryption Initialization Vector.
Implements Encrypt_Base.
DataChunkPtr GetIV | ( | void | ) | [inline, virtual] |
Get the Initialization Vector that will be used for the next encryption.
If called immediately after SetIV() with Force=true or SetIV() for a crypto scheme that accepts each offered vector (rather than creating its own ones) the result will be the vector offered in that SetIV() call.
Implements Encrypt_Base.
bool CanEncryptInPlace | ( | size_t | BlockSize = 0 |
) | [inline, virtual] |
Can this encryption system safely encrypt in place?
If BlockSize is 0 this function will return true if encryption of all block sizes can be "in place". Otherwise the result will indicate whether the given blocksize can be encrypted "in place".
Implements Encrypt_Base.
bool EncryptInPlace | ( | size_t | Size, | |
UInt8 * | Data | |||
) | [inline, virtual] |
DataChunkPtr Encrypt | ( | size_t | Size, | |
const UInt8 * | Data | |||
) | [virtual] |
Encrypt data and return in a new buffer.
Implements Encrypt_Base.
AES_KEY CurrentKey [protected] |