public interface PINPadExtendDevice extends PINPadDevice
PINPadExtendDevice
interface extends PINPadDevice
to provide additional functionalities for PINPad devices.
It defines extended APIs that applications can use to interact with the PINPad device.
To obtain an instance of this interface:
PINPadExtendDevice pinPadDevice = (PINPadExtendDevice) POSTerminal.getInstance().getDevice("com.cloudpos.device.pinpad");
This string "com.cloudpos.device.pinpad" uniquely identifies the PINPad device as defined by its specific implementation.
Key functionalities include:
Permissions required for different operations:
android.permission.CLOUDPOS_PIN_GET_PIN_BLOCK
- For PIN block operations.android.permission.CLOUDPOS_PIN_MAC
- For MAC calculation.android.permission.CLOUDPOS_PIN_ENCRYPT_DATA
- For data encryption.android.permission.CLOUDPOS_PIN_UPDATE_USER_KEY
- For updating user keys.PINPadDevice
ALGO_CHECK_VALUE_DEFAULT, ALGO_CHECK_VALUE_SE919, CHECK_TYPE_CUP, CHECK_TYPE_NONE, KEY_TYPE_FIX, KEY_TYPE_MK_SK, KEY_TYPE_PUBLIC, KEY_TYPE_TDUKPT, KEY_TYPE_TDUKPT_2009, KEY_TYPE_TDUKPT_2009_RESPONSE, KEY_TYPE_TDUKPT_AES, USER_KEY_ID_DATA, USER_KEY_ID_MAC, USER_KEY_ID_PIN
Modifier and Type | Method and Description |
---|---|
byte[] |
decryptData(KeyInfo keyInfo,
byte[] cipherdata,
int mode,
byte[] IV)
Decrypts data using a user-defined key specified in
KeyInfo . |
byte[] |
getMasterKeyCheckValue(int masterKeyID,
int algoCheckValue)
Retrieves the check value for a specified master key.
|
byte[] |
getTransportKeyCheckValue(int keyID,
int checkType)
Retrieves the check value for a specified transport key.
|
calculateMac, calculateMac, calculateResponseMac, changePin, clearText, createPin, encryptData, encryptData, getDukptAesStatus, getDukptStatus, getLastPINLength, getMkStatus, getRandom, getSessionKeyCheckValue, getSkStatus, getSN, listenForOfflinePin, listenForPinBlock, listenForPinBlock, open, selectPinblockFormat, setAllowByPass, setGUIConfiguration, setGUIConfiguration, setPINLength, setupCallbackHandler, showText, showText, updateMasterKey, updateMasterKeyWithCheck, updateMasterKeyWithCheckByMK, updateUserKey, updateUserKey, updateUserKey, updateUserKey, updateUserKeyWithCheck, updateUserKeyWithTR31Format, verifyResponseMac, waitForOfflinePin, waitForPinBlock, waitForPinBlock
cancelRequest, close, getFailCount, getUsageCount, open
byte[] getTransportKeyCheckValue(int keyID, int checkType) throws DeviceException
keyID
- The index of the transport key.checkType
- The type of check value to retrieve. Currently, only the default format (0) is supported.DeviceException
- For specific error details, refer to DeviceException
documentation.byte[] getMasterKeyCheckValue(int masterKeyID, int algoCheckValue) throws DeviceException
masterKeyID
- The index of the master key.algoCheckValue
- The algorithm check value. 0 for default, 1 for SE919 algorithm.DeviceException
- For specific error details, refer to DeviceException
documentation.byte[] decryptData(KeyInfo keyInfo, byte[] cipherdata, int mode, byte[] IV) throws DeviceException
KeyInfo
.keyInfo
- The KeyInfo
object containing key information for decryption.cipherdata
- The data buffer to be decrypted.mode
- The decryption mode (0 for EBC, 1 for CBC, 2 for CFB, 3 for OFB, NoPadding).IV
- The initial vector, used only for CBC, CFB, and OFB modes.DeviceException
- For standard error scenarios, as documented in DeviceException
.