KM_ImportFromPinPad

Import a key from components entered on a PIN Pad device.

NOTE   This function uses the following callback:

>UICB_ShowMsg_t

Synopsis

#include <kmlib.h>

CK_RV KM_ImportFromPinPad ( 
   CK_SESSION_HANDLE   hSession,
   CK_CHAR *           pszLabel,
   CK_KEY_TYPE         keyType,
   CK_SIZE             keySizeInBits,
   CK_ATTRIBUTE *      pTpl,
   CK_COUNT            tplSize,
   CK_COUNT            numComps,
   CK_OBJECT_HANDLE *  phKey
);
Parameter Description
hSession Handle to an open session.
pszLabel Label to give resulting key.
keyType

The type of the resulting PKCS #11 key. For example:

>CKK_AES

>CKK_CAST128

>CKK_DES

>CKK_DES2

>CKK_DES3

>CKK_IDEA

>CKK_RC2

>CKK_RC4

>CKK_GENERIC_SECRET

keySizeInBits

Size, in bits, of the resulting key. This is not needed for fixed length key types. The size ranges for the supported PKCS #11 key types. For example:

>CKK_AES - 128, 192 or 256 bits

>CKK_CAST128 - 8, 64 or 128 bits

>CKK_DES - 64 bits

>CKK_DES2 - 128 bits

>CKK_DES3 - 192 bits

>CKK_IDEA - 128 bits

>CKK_RC2 - 8 to 1024 bits in 8 bit increments

>CKK_RC4 - 8 to 2048 bits in 8 bit increments

>CKK_GENERIC_SECRET - 8 to "Effectively Infinite" bits

pTpl The attribute template the resulting key will have.
tplSize The number of attributes in template.
numComps The number of XORable components that need to be entered to create the resulting key. This must be >= 2.
phKey Location to store the handle of the resulting key.

Returns

CKR_ARGUMENTS_BAD
CKR_ATTRIBUTE_READ_ONLY
CKR_ATTRIBUTE_TYPE_INVALID
CKR_ATTRIBUTE_VALUE_INVALID
CKR_CRYPTOKI_NOT_INITIALIZED
CKR_DEVICE_ERROR
CKR_DEVICE_MEMORY
CKR_DEVICE_REMOVED
CKR_FUNCTION_CANCELED
CKR_FUNCTION_FAILED
CKR_GENERAL_ERROR
CKR_HOST_MEMORY
CKR_KEY_HANDLE_INVALID
CKR_KEY_SIZE_RANGE
CKR_KEY_TYPE_INCONSISTENT
CKR_MECHANISM_INVALID
CKR_MECHANISM_PARAM_INVALID
CKR_OBJECT_HANDLE_INVALID
CKR_OK
CKR_OPERATION_ACTIVE
CKR_SESSION_CLOSED
CKR_SESSION_HANDLE_INVALID
CKR_SESSION_READ_ONLY
CKR_TEMPLATE_INCOMPLETE
CKR_TEMPLATE_INCONSISTENT
CKR_TOKEN_WRITE_PROTECTED
CKR_USER_NOT_LOGGED_IN