Decrypt_Base Class Reference

Base decryptor wrapper class. More...

#include <crypto.h>

Inheritance diagram for Decrypt_Base:

RefCount IRefCount AESDecrypt List of all members.

Public Member Functions

 Decrypt_Base ()
virtual ~Decrypt_Base ()
bool SetKey (DataChunk &Key)
 Set a decryption key.
bool SetKey (DataChunkPtr &Key)
 Set a decryption key.
virtual bool SetKey (size_t KeySize, const UInt8 *Key)=0
 Set a decryption key.
virtual bool SetIV (size_t IVSize, const UInt8 *IV, bool Force=false)=0
 Set a decryption Initialization Vector.
bool SetIV (DataChunk &IV, bool Force=false)
 Set a decryption Initialization Vector.
bool SetIV (DataChunkPtr &IV, bool Force=false)
 Set a decryption Initialization Vector.
virtual DataChunkPtr GetIV (void)=0
 Get the Initialization Vector that will be used for the next decryption.
virtual bool CanDecryptInPlace (size_t BlockSize=0)=0
 Can this decryption system safely decrypt in place?
virtual bool DecryptInPlace (size_t Size, UInt8 *Data)=0
 Decrypt data bytes in place.
bool DecryptInPlace (DataChunk &Data)
 Decrypt data bytes in place.
bool DecryptInPlace (DataChunkPtr &Data)
 Decrypt data bytes in place.
virtual DataChunkPtr Decrypt (size_t Size, const UInt8 *Data)=0
 Decrypt data and return in a new buffer.
DataChunkPtr Decrypt (DataChunk &Data)
 Decrypt data and return in a new buffer.
DataChunkPtr Decrypt (DataChunkPtr &Data)
 Decrypt data and return in a new buffer.

Detailed Description

Base decryptor wrapper class.

Note:
Classes derived from this class must not include their own RefCount<> derivation


Constructor & Destructor Documentation

Decrypt_Base (  )  [inline]

virtual ~Decrypt_Base (  )  [inline, virtual]


Member Function Documentation

bool SetKey ( DataChunk Key  )  [inline]

Set a decryption key.

Returns:
True if key is accepted

bool SetKey ( DataChunkPtr Key  )  [inline]

Set a decryption key.

Returns:
True if key is accepted

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

Set a decryption key.

Returns:
True if key is accepted

Implemented in AESDecrypt.

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

Set a decryption 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.

Implemented in AESDecrypt.

bool SetIV ( DataChunk IV,
bool  Force = false 
) [inline]

Set a decryption 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.

bool SetIV ( DataChunkPtr IV,
bool  Force = false 
) [inline]

Set a decryption 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.

virtual DataChunkPtr GetIV ( void   )  [pure virtual]

Get the Initialization Vector that will be used for the next decryption.

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.

Implemented in AESDecrypt.

virtual bool CanDecryptInPlace ( size_t  BlockSize = 0  )  [pure virtual]

Can this decryption system safely decrypt in place?

If BlockSize is 0 this function will return true if decryption of all block sizes can be "in place". Otherwise the result will indicate whether the given blocksize can be decrypted "in place".

Implemented in AESDecrypt.

virtual bool DecryptInPlace ( size_t  Size,
UInt8 Data 
) [pure virtual]

Decrypt data bytes in place.

Returns:
true if the decryption appears to be successful

Implemented in AESDecrypt.

bool DecryptInPlace ( DataChunk Data  )  [inline]

Decrypt data bytes in place.

Returns:
true if the decryption appears to be successful

bool DecryptInPlace ( DataChunkPtr Data  )  [inline]

Decrypt data bytes in place.

Returns:
true if the decryption appears to be successful

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

Decrypt data and return in a new buffer.

Returns:
NULL pointer if the decryption is unsuccessful

Implemented in AESDecrypt.

DataChunkPtr Decrypt ( DataChunk Data  )  [inline]

Decrypt data and return in a new buffer.

Returns:
NULL pointer if the decryption is unsuccessful

DataChunkPtr Decrypt ( DataChunkPtr Data  )  [inline]

Decrypt data and return in a new buffer.

Returns:
NULL pointer if the decryption is unsuccessful


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