CBufferedTransformation Class Reference
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.
Constructor & Destructor Documentation
CBufferedTransformation()
CBufferedTransformation | ( | ) | [protected] |
~CBufferedTransformation()
IMPORT_C | ~CBufferedTransformation | ( | ) | [virtual] |
The destructor frees all resources owned by the object, prior to its destruction.
Member Functions Documentation
BlockSize()
TInt
| BlockSize | ( | ) | const [virtual] |
Gets the block size in bits (8 for stream ciphers).
BlockTransformer()
Gets the underlying block transform.
ConstructL(CBlockTransformation *, CPadding *)
KeySize()
TInt
| KeySize | ( | ) | const [virtual] |
Gets the key size in bits.
MaxOutputLength(TInt)
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.
Parameters
TInt aInputLength | The length of data to be supplied to Process() in bytes. |
Process(const TDesC8 &, TDes8 &)
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.
Parameters
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. |
Reset()
Resets the cipher back to its original state. Clears all its buffers.
Member Data Documentation
CBlockTransformation * iBT
A block transformation object
TPtr8
iInputStore
TPtr8
| iInputStore | [protected] |
A pointer to iInputStoreBuf
HBufC8 * iInputStoreBuf
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.