4.5 WFS_CMD_PIN_LOCAL_DES

Description The PIN, which was entered with the WFS_PIN_GET_PIN command, is combined with the requisite data specified by the DES validation algorithm and locally verified for correctness. The local DES verification is based on the IBM 3624 standard. The result of the verification is returned to the application. This command will clear the PIN.

Input Param LPWFSPINLOCALDES lpLocalDES;

typedef struct _wfs_pin_local_des
{
LPSTR lpsValidationData;
LPSTR lpsOffset;
BYTE bPadding;
USHORT usMaxPIN;
USHORT usValDigits;
BOOL bNoLeadingZero;
LPSTR lpsKey;
LPWFSXDATA lpxKeyEncKey;
LPSTR lpsDecTable;
} WFSPINLOCALDES, * LPWFSPINLOCALDES;

lpsValidationData
Validation data

lpsOffset
Offset for the PIN block; if NULL then no offset is used.

bPadding
Specifies the padding character for validation data.

usMaxPIN
Maximum number of PIN digits to be used for validation.

usValDigits
Number of Validation digits to be used for validation.

bNoLeadingZero
If set to TRUE and the first digit of result of the modulo 10 addition is a X’0’, it is replaced with X’1’ before performing the verification against the entered PIN. If set to FALSE, a leading zero is allowed in entered PINs.

lpsKey
Name of the validation key

lpxKeyEncKey
If NULL, lpsKey is used directly for PIN validation. Otherwise, lpsKey is used to decrypt the encrypted key passed in lpxKeyEncKey and the result is used for PIN validation.

lpsDecTable
ASCII decimalization table (16 character string containing characters ‘0’ to ‘9’). Used to convert the hexadecimal digits (0x0 to 0xF) of the encrypted validation data to decimal digits (0x0 to 0x9).

Output Param LPBOOL pbResult;

lpbResult
Pointer to a boolean value which specifies whether the PIN is correct or not.

Error Codes The following additional error codes can be generated by this command:

Value Meaning

WFS_ERR_PIN_KEYNOTFOUND The specified key was not found.

WFS_ERR_PIN_KEYNOVALUE The specified key is not loaded.

WFS_ERR_PIN_USEVIOLATION The specified use is not supported by this key.

WFS_ERR_PIN_ACCESSDENIED The encryption module is either not initialized or not ready for any vendor specific reason.

WFS_ERR_PIN_NOPIN PIN has not been entered or has been cleared.

Events The following additional events can be generated by this command:

Value Meaning

WFS_SRVE_PIN_ILLEGAL_KEY_ACCESS An error occured accessing an encryption key.

Comments None.