GetInfo
Synopsis
#include “fmciphobj.h”
int (*GetInfo)(struct CipherObj * ctx, struct CipherInfo * info);
Description
This function can be called to obtain the values of the algorithm-dependent parameters of a cipher object.
Parameters
Parameter |
Description |
---|---|
ctx
|
The address of a cipher object. |
info
|
The address of the info structure that will contain the algorithm information when the function returns. |
Return Value
0: Operation completed successfully.
Otherwise: there was an error – this should not happen.
Comments
The info structure is defined as (from fmciphobj.h):
struct CipherInfo {
char name[32];
unsigned int minKeyLength;
unsigned int maxKeyLength;
unsigned int blockSize;
unsigned int defSignatureSize;
struct CipherObj * ciph;
};
The field meanings are:
>name: Name of the cipher algorithm. Zero terminated.
>minKeyLength: Minimum key length, in number of bytes
>maxKeyLength: Maximum key length, in number of bytes
>blockSize: Cipher block size, in number of bytes
>defSignatureSize: Default Signature size, in number of bytes
>ciph: The address of the cipher object (obsolete, and not filled in by most cipher objects).