public class KeyInfo
extends java.lang.Object
KeyInfo
class represents key information and the associated algorithm used in PINPad operations.
This class provides the necessary details to specify the type of key, its index, and the cryptographic algorithm to be used.Modifier and Type | Field and Description |
---|---|
int |
algorithm
Algorithm type, see
ALG_3DES for example. |
int |
keyID
Key index.
|
int |
keyType
Key type.
|
int |
masterKeyID
Master key index, ranging from 0 to 49.
|
Constructor and Description |
---|
KeyInfo(int keyType,
int keyID,
int algorithm)
Constructs a KeyInfo object specifically for DUKPT keys.
|
KeyInfo(int keyType,
int masterKeyID,
int keyID,
int algorithm)
Constructs a KeyInfo object for keys of type
KEY_TYPE_MK_SK . |
public int keyType
PINPadDevice
:
KEY_TYPE_TDUKPT
, KEY_TYPE_MK_SK
, KEY_TYPE_FIX
, KEY_TYPE_TDUKPT_2009
.public int masterKeyID
KEY_TYPE_MK_SK
.public int keyID
KEY_TYPE_MK_SK
, valid constants are USER_KEY_ID_PIN
,
USER_KEY_ID_MAC
, USER_KEY_ID_DATA
.
For other key types, it represents the key index.public int algorithm
ALG_3DES
for example.public KeyInfo(int keyType, int masterKeyID, int keyID, int algorithm)
KEY_TYPE_MK_SK
.keyType
- The type of the key, e.g., KEY_TYPE_MK_SK
.masterKeyID
- The master key index (0 to 49).keyID
- The specific key index (0, 1, or 2).algorithm
- The cryptographic algorithm, e.g., ALG_3DES
.public KeyInfo(int keyType, int keyID, int algorithm)
keyType
- The type of the DUKPT key, either KEY_TYPE_TDUKPT
or KEY_TYPE_TDUKPT_2009
.keyID
- The key index (0 to 49).algorithm
- The cryptographic algorithm, e.g., ALG_3DES
.