| QuickCrypt Library | API |
|
SL_DESX_Init
void SL_CRYPTCALL SL_DESX_Init( void* pContext, int nDir, const void* pKey, unsigned int nKeyLen );
Parameters
pContext
[out] Pointer to the memory buffer that will be used as a context.
nDir
[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. This parameter was added for consistency with other encryption algorithms and it is ignored. The algorithm always uses the first SLC_DESX_DEFAULTKEYSIZE bytes of the memory buffer pointed by pKey as secret key.
Remarks
Initializes the context pointed by pContext with the secret key pointed by pKey. The context is initialized for encryption if nDir is SLC_ENCRYPT, or it is initialized for decryption if nDir is SLC_DECRYPT.
Before calling SL_DESX_Init allocate at least SLC_DESX_CONTEXTSIZE bytes for the context.
Example
See the example for SL_DESX_ProcessBlock.
DESX API Overview | DESX API Functions | Useful Links
See Also SL_DESX_ProcessBlock
| Send Feedback to SlavaSoft Inc. | Tell a friend about QuickCrypt Library |