|
QuickCrypt Library |
C++ Interface |
|
CCBCMode::ProcessLastBlock
unsigned int ProcessLastBlock( unsigned char*
pDestBlock, const unsigned char* pSrcBlock, unsigned int
nSize );
Return Value
The size in bytes of the memory block pointed by
pDestBlock that receives the result of encryption/decryption.
Parameters
pDestBlock
[out] Pointer to the memory
block that will receive the result of encryption/decryption.
pSrcBlock
[in] Pointer to the memory
block that has to be encrypted/decrypted.
nSize
[in] Size in bytes of the memory
block pointed by pSrcBlock. It can be in the range 0 through
CCBCMode<T>::BLOCKSIZE
bytes.
Remarks
Call this member function to encrypt/decrypt a memory
block that is shorter than
CCBCMode<T>::BLOCKSIZE bytes. Usually this is the last
block that has to be processed. The
result is retrieved in the memory block
pointed by
pDestBlock.
If the memory block pointed by pSrcBlock
is shorter than
CCBCMode<T>::BLOCKSIZE bytes and the CCBCMode
object has been initialized to be padded (bPadded flag was set to
true) than the
padding string is added to the end of the block to fill it.
To perform an in-place encryption/decryption, make pDestBlock equal to pSrcBlock.
Note. To perform encryption/decryption in CBC
mode it is easier to use
Process member
function instead of
ProcessBlock and ProcessLastBlock.
CCBCMode Overview
| Class Members
|
Useful Links
See Also
CCBCMode::Init, CCBCMode::ProcessBlock
|