|
QuickCrypt Library |
C++ Interface |
|
CBlowfish::Init
void Init( SL_CIPHER_DIR dir, const
unsigned char* pKey );
void Init( SL_CIPHER_DIR dir, const
unsigned char* pKey, unsigned int nKeyLen );
Parameters
dir
[in]
Cipher direction. It can
be SLC_ENCRYPT or
SLC_DECRYPT.
pKey
[in] Pointer to the secret
key.
nKeyLen
[in] Length in bytes
of the key. It can be in the range 1 through 72 bytes.
Remarks
Both member functions initialize the CBlowfish object with the secret key pointed by
pKey. Note that if nKeyLen it is not indicated, the first CBlowfish::DEFAULTKEYSIZE bytes of the memory
buffer pointed by
pKey are
used as the secret key.
The CBlowfish object is initialized for encryption if dir is SLC_ENCRYPT, or it is initialized for decryption if dir is
SLC_DECRYPT.
Example
See the example for
CBlowfish::ProcessBlock.
CBlowfish Overview
| Class Members
|
Useful Links
See Also
CBlowfish::ProcessBlock
|