class CBlockChainingMode : public CBlockTransformation |
Abstract class defining the use of block transformation objects as block chaining modes.
It is initialised with a subclass of CBlockTransformation, which it subsequently owns. Calls to its Transform() function will call the Transform() function in the underlying CBlockTransformation object, and perform the additional transformation for block chaining in that mode. This all means that if you want to do, say, AES encryption in CBC mode, you need to construct a CAESEncryptor object, then pass it to the CModeCBCEncryptor subclass of CBlockChainingMode, and subsequently use the CModeCBCEncryptor object to call Transform().
Public Member Functions | |
---|---|
TInt | BlockSize() |
TInt | KeySize() |
void | Reset() |
void | SetIV(const TDesC8 &) |
Protected Member Functions | |
---|---|
CBlockChainingMode() | |
~CBlockChainingMode() | |
IMPORT_C void | ConstructL(CBlockTransformation *, const TDesC8 &) |
Protected Attributes | |
---|---|
CBlockTransformation * | iBT |
TPtr8 | iIV |
HBufC8 * | iIVBuf |
TPtr8 | iRegister |
HBufC8 * | iRegisterBuf |
IMPORT_C | ~CBlockChainingMode | ( | ) | [protected, virtual] |
The destructor frees all resources owned by the object, prior to its destruction.
IMPORT_C void | ConstructL | ( | CBlockTransformation * | aBT, |
const TDesC8 & | aIV | |||
) | [protected] |
Second phase constructor
This should be called last by derived classes' ContructL()s .
CBlockTransformation * aBT | A block transformation object |
const TDesC8 & aIV | Initialization vector, the length of this descriptor must be the same as the underlying cipher's block size. |
void | Reset | ( | ) | [virtual] |
Resets the transformation back to its original state. Clears all its buffers.
void | SetIV | ( | const TDesC8 & | aIV | ) | [virtual] |
Sets the initialization vector.
const TDesC8 & aIV | The initialization vector. The length of this descriptor must be the same as the underlying cipher's block size. |
HBufC8 * | iIVBuf | [protected] |
A buffer containing the Initialisation Vector (IV)
This must equal the underlying cipher's block size in length.
HBufC8 * | iRegisterBuf | [protected] |
A buffer containing the feedback register
This must equal the underlying cipher's block size in length. Initially this register is filled with the initialization vector.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.