public class CryptoUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ALGORITHM_DES_EDE |
protected static java.lang.String |
DES_EDE_CBC_NO_PADDING |
protected static java.lang.String |
DES_EDE_ECB_NO_PADDING |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
calculateCheckDigits(AtallaSimulator simulator,
java.lang.String keyValue,
int checkDigitHexLength) |
static java.lang.String |
calculateCheckDigits(javax.crypto.SecretKey secretKey,
int checkDigitHexLength) |
static java.lang.String |
calculateKeyBytesCheckDigits(byte[] keyBytes,
int checkDigitHexLength) |
static javax.crypto.SecretKey |
createSecretKey(byte[] keyBytes)
ICC Master Key
|
static javax.crypto.SecretKey |
derivativeICCMasterKey(AtallaSimulator simulator,
AKB issuerMasterKey,
java.lang.String pan,
java.lang.String cardSequence)
Derivative ICC Master Key from Issuer Master key
|
static byte[] |
derivativeICCMasterKeyBytes(AtallaSimulator simulator,
AKB issuerMasterKey,
java.lang.String pan,
java.lang.String cardSequence)
Derivative ICC Master Key bytes from Issuer Master key
|
static byte[] |
deriveSessionKeyBytes(byte[] iccMasterKeyBytes,
java.lang.String diversificationData) |
static byte[] |
encrypt(byte[] keyBytes,
byte[] clearText) |
static byte[] |
encrypt(javax.crypto.SecretKey secretKey,
byte[] clearText) |
static java.lang.String |
mac(byte[] macKeyBytes,
byte[] text,
int resultLength) |
static java.lang.String |
mac(javax.crypto.SecretKey macKey,
byte[] text,
int resultLength) |
static byte[] |
padDatablock(byte[] data,
byte firstPadByte,
byte endPadByte) |
protected static final java.lang.String ALGORITHM_DES_EDE
protected static final java.lang.String DES_EDE_ECB_NO_PADDING
protected static final java.lang.String DES_EDE_CBC_NO_PADDING
public static byte[] padDatablock(byte[] data,
byte firstPadByte,
byte endPadByte)
public static byte[] encrypt(byte[] keyBytes,
byte[] clearText)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static byte[] encrypt(javax.crypto.SecretKey secretKey,
byte[] clearText)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static java.lang.String mac(byte[] macKeyBytes,
byte[] text,
int resultLength)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static java.lang.String mac(javax.crypto.SecretKey macKey,
byte[] text,
int resultLength)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static javax.crypto.SecretKey createSecretKey(byte[] keyBytes)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static javax.crypto.SecretKey derivativeICCMasterKey(AtallaSimulator simulator, AKB issuerMasterKey, java.lang.String pan, java.lang.String cardSequence) throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static byte[] derivativeICCMasterKeyBytes(AtallaSimulator simulator, AKB issuerMasterKey, java.lang.String pan, java.lang.String cardSequence) throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static byte[] deriveSessionKeyBytes(byte[] iccMasterKeyBytes,
java.lang.String diversificationData)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static java.lang.String calculateKeyBytesCheckDigits(byte[] keyBytes,
int checkDigitHexLength)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static java.lang.String calculateCheckDigits(javax.crypto.SecretKey secretKey,
int checkDigitHexLength)
throws java.security.GeneralSecurityException
java.security.GeneralSecurityExceptionpublic static java.lang.String calculateCheckDigits(AtallaSimulator simulator, java.lang.String keyValue, int checkDigitHexLength) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException