| QuickCrypt Library | C++ Interface |
|
CCBCMode::Init
void Init( SL_CIPHER_DIR dir, const unsigned char* pIV, const unsigned char* pKey, unsigned int nKeyLen = DEFAULTKEYSIZE, bool bPadded = true );
Parameters
dir
[in] Cipher direction. It can be SLC_ENCRYPT or SLC_DECRYPT.
pIV
[in] Pointer to the initialization vector.
pKey
[in] Pointer to the secret key.
nKeyLen
[in] Length in bytes of the secret key.
bPadded
[in] Padding flag. If the memory block that has to be processed is shorter than CCBCMode<T>::BLOCKSIZE bytes and bPadded is true than the padding string is appended to the end of the block. The complementary length of the last block will be used as the padding character. If bPadded is false, no padding is done.
Remarks
Call this member function to initialize the CCBCMode object with the initialization vector pointed by pIV, and the secret key pointed by pKey.
Notes.
The first CCBCMode<T>::BLOCKSIZE bytes of the memory buffer pointed by pIV are used as the initialization vector.
nKeyLen can be CCBCMode<T>::DEFAULTKEYSIZE bytes. For Rijndael (AES) algorithm it can also be 24 or 32 bytes. For Blowfish algorithm it can be in the range 1 through 72 bytes.
The CCBCMode object is initialized for encryption if dir is SLC_ENCRYPT, or it is initialized for decryption if dir is SLC_DECRYPT.
Example
|
CCBCMode Overview | Class Members | Useful Links
See Also CCBCMode::ProcessBlock, CCBCMode::ProcessLastBlock, CCBCMode::Process
| Send Feedback to SlavaSoft Inc. | Tell a friend about QuickCrypt Library |