| QuickCrypt Library | API |
|
SL_CBC_ProcessLastBlock
unsigned int SL_CRYPTCALL SL_CBC_ProcessLastBlock( void* pContext, void* pDestBlock, const void* 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
pContext
[in] Pointer to the context.
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 BLOCKSIZE bytes.
Remarks
Call this function to encrypt/decrypt a memory block that is shorter than 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 BLOCKSIZE bytes and the context 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 SL_CBC_Process member function instead of SL_CBC_ProcessBlock and SL_CBC_ProcessLastBlock.
CBC Mode API Overview | CBC Mode Functions | Useful Links
See Also SL_CBC_Init, SL_CBC_ProcessBlock
| Send Feedback to SlavaSoft Inc. | Tell a friend about QuickCrypt Library |