CK_MECHANISM_TYPE_PTR is a pointer to a CK_MECHANISM_TYPE.
CK_MECHANISM; CK_MECHANISM_PTR
CK_MECHANISM is a structure that specifies a particular mechanism and any parameters it requires. It is defined as follows:
typedef struct CK_MECHANISM {
CK_MECHANISM_TYPE mechanism;
CK_VOID_PTR pParameter;
CK_ULONG ulParameterLen;
} CK_MECHANISM;
The fields of the structure have the following meanings:
mechanism the type of mechanism
pParameter pointer to the parameter if required by the mechanism
ulParameterLen length in bytes of the parameter
Note that pParameter is a “void” pointer, facilitating the passing of arbitrary values. Both the application and the Cryptoki library must ensure that the pointer can be safely cast to the expected type (i.e., without word-alignment errors).
CK_MECHANISM_PTR is a pointer to a CK_MECHANISM.
CK_MECHANISM_INFO; CK_MECHANISM_INFO_PTR
CK_MECHANISM_INFO is a structure that provides information about a particular mechanism. It is defined as follows:
typedef struct CK_MECHANISM_INFO {
CK_ULONG ulMinKeySize;
CK_ULONG ulMaxKeySize;
CK_FLAGS flags;
} CK_MECHANISM_INFO;
The fields of the structure have the following meanings:
ulMinKeySize the minimum size of the key for the mechanism (whether this is measured in bits or in bytes is mechanism-dependent)
ulMaxKeySize the maximum size of the key for the mechanism (whether this is measured in bits or in bytes is mechanism-dependent)
flags bit flags specifying mechanism capabilities
For some mechanisms, the ulMinKeySize and ulMaxKeySize fields have meaningless values.
The following table defines the flags field:
Table 12, Mechanism Information Flags
Share with your friends: |