|
QuickCrypt Library |
API |
|
SL_GOST_Init
void SL_CRYPTCALL SL_GOST_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_GOST_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_GOST_Init allocate at least
SLC_GOST_CONTEXTSIZE bytes for the
context.
Example
See the example for
SL_GOST_ProcessBlock.
GOST API Overview
| GOST API Functions
|
Useful Links
See Also
SL_GOST_ProcessBlock
|