UnloadParam

This function may be used to save the operational parameters of a cipher object. This function is used in conjunction with the LoadParam function.

Synopsis

#include “fmciphobj.h”
int (*UnloadParam)(struct CipherObj * ctx,
void * param, unsigned int length, unsigned int *plen);
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.
plen Address of a variable that will receive the number of bytes placed in the param buffer. This variable must not be NULL.

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.