QuickCrypt Library API

SL_CTR_Init

int SL_CRYPTCALL SL_CTR_Init( void* pContext, const void* pIV );

Return Value

1 if initializations was successful; otherwise 0.

Parameters

pContext

    [out] Pointer to the memory buffer that will be used as a context.

pIV

    [in] Pointer to the initialization vector.

Remarks

Initializes the context pointed by pContext with the initialization vector pointed by pIV.

Before calling the SL_CTR_Init function, allocate at least CONTEXTSIZE bytes for the context. For example, to perform Blowfish encryption/decryption allocate at least SLC_BLOWFISH_CONTEXTSIZE bytes for the context.

Before calling SL_CTR_Init call the Init function of the encryption algorithm you need to use, passing to it the secret key and the cipher direction (SLC_ENCRYPT only). For example, to perform DES encryption/decryption in Counter mode call SL_DES_Init function before calling SL_CTR_Init

Examples

DES encryption/decryption of a file in Counter mode

DES encryption/decryption of a part of memory buffer in Counter mode

 

CTR Mode API Overview   |   CTR Mode API Functions   |   Useful Links

 

See Also    SL_CTR_Process, SL_CTR_Seek


 

 

Send Feedback to SlavaSoft Inc. Tell a friend about QuickCrypt Library