AESEncrypt Class Reference

AES encryption class. More...

#include <crypto_asdcp.h>

Inheritance diagram for AESEncrypt:

Encrypt_Base RefCount IRefCount List of all members.

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]

Detailed Description

AES encryption class.


Member Function Documentation

bool SetKey ( size_t  KeySize,
const UInt8 Key 
) [inline, virtual]

Set an encryption key.

Returns:
True if key is accepted

Implements Encrypt_Base.

bool SetIV ( size_t  IVSize,
const UInt8 IV,
bool  Force = false 
) [inline, virtual]

Set an encryption Initialization Vector.

Returns:
False if Initialization Vector is rejected
Note:
Some crypto schemes, such as cypher block chaining, only require the initialization vector to be set at the start - in these cases Force will be set to true when the vector needs to be initialized, and false for any other calls. This allows different schemes to be used with minimal changes in the calling code.

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]

Encrypt data bytes in place.

Returns:
true if the encryption is successful

Implements Encrypt_Base.

DataChunkPtr Encrypt ( size_t  Size,
const UInt8 Data 
) [virtual]

Encrypt data and return in a new buffer.

Returns:
NULL pointer if the encryption is unsuccessful

Implements Encrypt_Base.


Member Data Documentation

AES_KEY CurrentKey [protected]

UInt8 CurrentIV[16] [protected]


The documentation for this class was generated from the following files:
Generated on Mon Apr 2 15:20:56 2007 for MXFLib by  doxygen 1.5.1-p1