LoadParam

This function may be used to load the saved parameters of a cipher object. This function is used in conjunction with the UnloadParam function.

Synopsis

#include “fmciphobj.h”
int (*LoadParam)(struct CipherObj * ctx,
const void * param, unsigned int length);
Parameter Description
ctx The address of a cipher object instance.
param The address of the buffer containing various parameters for the encrypt operation. The contents and the encoding of this buffer are algorithm and mode dependent. However, for most block ciphers this buffer contains the IV when one of the CBC modes is used. Please consult Algorithm-Specific Cipher Information for key encoding information.
length Number of bytes in the param buffer.

Return Value

0: The operation was successful.

Otherwise: an error occurred.

Comments

The LoadParam and UnloadParam functions are not very useful, as they do not encode the key value along with the operational parameters.