class CBufferedTransformation : public CSymmetricCipher |
Abstract class, deriving from CSymmetricCipher , encapsulating the buffering logic for block ciphers.
It is responsible for feeding complete blocks of plaintext or ciphertext to the underlying encryptor or decryptor. Since the only difference between block cipher encryption and decryption is the ProcessFinalL() call, CBufferedTransformation implements all functions (by buffering and/or forwarding to the encryptor/decryptor) except ProcessFinalL() and MaxFinalOutputLength() .
See the Cryptography api-guide documentation for the rules that this class and derived classes must follow.
Public Member Functions | |
---|---|
~CBufferedTransformation () | |
TInt | BlockSize () |
IMPORT_C CBlockTransformation * | BlockTransformer () |
TInt | KeySize () |
TInt | MaxOutputLength ( TInt ) |
void | Process (const TDesC8 &, TDes8 &) |
void | Reset () |
Protected Member Functions | |
---|---|
CBufferedTransformation () | |
void | ConstructL ( CBlockTransformation *, CPadding *) |
Protected Attributes | |
---|---|
CBlockTransformation * | iBT |
TPtr8 | iInputStore |
HBufC8 * | iInputStoreBuf |
CPadding * | iPadding |
IMPORT_C | ~CBufferedTransformation | ( | ) | [virtual] |
The destructor frees all resources owned by the object, prior to its destruction.
IMPORT_C CBlockTransformation * | BlockTransformer | ( | ) | const |
Gets the underlying block transform.
void | ConstructL | ( | CBlockTransformation * | aBT, |
CPadding * | aPadding | |||
) | [protected] |
CBlockTransformation * aBT | |
CPadding * aPadding |
TInt | MaxOutputLength | ( | TInt | aInputLength | ) | const [virtual] |
Gets a tight upper bound on the number of bytes that would be returned by a call to Process() with aInputLength bytes of data.
TInt aInputLength | The length of data to be supplied to Process() in bytes. |
void | Process | ( | const TDesC8 & | aInput, |
TDes8 & | aOutput | |||
) | [virtual] |
Encrypts or decrypts the input using the underlying block cipher, buffering the input as necessary.
See the Cryptography api-guide documentation.
const TDesC8 & aInput | The input is appended to the internal buffer (initially empty), then all whole blocks are encrypted using the underlying block transformation and written into aOutput. Any leftover bytes will be buffered. |
TDes8 & aOutput | The resulting processed data appended to aOutput. aOutput must have at least MaxOutputLength() empty bytes remaining in its length. |
void | Reset | ( | ) | [virtual] |
Resets the cipher back to its original state. Clears all its buffers.
HBufC8 * | iInputStoreBuf | [protected] |
A descriptor which provides a buffer the length of the block size of iBT
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.