calcKvc
Synopsis
CK_RV calcKvc(
CK_SESSION_HANDLE hSession,
CK_OBJECT_HANDLE hKey,
unsigned char * kvc,
int kvclen,
int * pkvclen);
Description
Calculate and return an AS2805 KVC for a key. The key must be capable of doing an encryption operation using the mechanism determined from the key type (see mechFromKt) for this to succeed. Note that mechanism parameters are set to NULL.
NOTE The CKA_CHECK_VALUE attribute can be used to get the KVC of a key that does not support the encryption operation.
Parameters
hSession |
Open session handle |
hKey |
Handle to the key to use for the encryption |
kvc |
Buffer to hold the encryption result |
kvclen |
Total number of bytes referenced by kvc |
pkvclen |
Reference to int to hold number of bytes copied into kvc |
On successful return
kvc — holds the encryption result
*pkvclen — number of bytes copied into kvc
If kvclen is smaller than the encryption result, then only kvclen bytes are copied into kvc.