com.pax.dal.entity
Enum ECheckMode
- java.lang.Object
-
- java.lang.Enum<ECheckMode>
-
- com.pax.dal.entity.ECheckMode
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<ECheckMode>
public enum ECheckMode extends java.lang.Enum<ECheckMode>
KCV校验模式KCV mode
-
-
Enum Constant Summary
Enum Constants Enum Constant and Description KCV_ENCRYPT_0对8个字节的0x00计算DES/TDES加密,得到 的密文的前4个字节即为KCVPerform DES/TDES encryption on 8 bytes 0x00, and use first 4 bytes as KCVKCV_ENCRYPT_FIX_DATA首先对密钥明文进行奇校验,再对“\x12\x34 x56\x78\x90\x12\x34\x56”进行DES/TDES, 加密运算,得到密文的前4个字节即为KCVPerform parity check first, then perform DES/TDES encryption on 8 bytes―\x12\x34\x56\x78\x90\x12\x34\x56, and use first 4 bytes as KCVKCV_MAC_INPUT_DATA传入一串数据KcvData,使用源密钥对 [aucDstKeyValue(密文) + KcvData]进行指定模式的MAC运算,得到8个字节MAC即为KCVSend in data KcvData, use source key to perform specified mode of MAC on [aucDesKeyValue +KcvData], and use the 8 bytes result as KCVKCV_NONE无校验No CheckKCV_SM4_ENCRYPT_0对16个字节的0x00 进行SM4 加密,得到的密文的前4 个字节即为KCVPerform TDES encryption on 16 bytes 0x00 by SM4, and use first 4 bytes as KCV
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description bytegetCheckMode()static ECheckModevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ECheckMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
KCV_NONE
public static final ECheckMode KCV_NONE
无校验No Check
-
KCV_ENCRYPT_0
public static final ECheckMode KCV_ENCRYPT_0
对8个字节的0x00计算DES/TDES加密,得到 的密文的前4个字节即为KCVPerform DES/TDES encryption on 8 bytes 0x00, and use first 4 bytes as KCV
-
KCV_ENCRYPT_FIX_DATA
public static final ECheckMode KCV_ENCRYPT_FIX_DATA
首先对密钥明文进行奇校验,再对“\x12\x34 x56\x78\x90\x12\x34\x56”进行DES/TDES, 加密运算,得到密文的前4个字节即为KCVPerform parity check first, then perform DES/TDES encryption on 8 bytes―\x12\x34\x56\x78\x90\x12\x34\x56, and use first 4 bytes as KCV
-
KCV_MAC_INPUT_DATA
public static final ECheckMode KCV_MAC_INPUT_DATA
传入一串数据KcvData,使用源密钥对 [aucDstKeyValue(密文) + KcvData]进行指定模式的MAC运算,得到8个字节MAC即为KCVSend in data KcvData, use source key to perform specified mode of MAC on [aucDesKeyValue +KcvData], and use the 8 bytes result as KCV
-
KCV_SM4_ENCRYPT_0
public static final ECheckMode KCV_SM4_ENCRYPT_0
对16个字节的0x00 进行SM4 加密,得到的密文的前4 个字节即为KCVPerform TDES encryption on 16 bytes 0x00 by SM4, and use first 4 bytes as KCV
-
-
Method Detail
-
values
public static ECheckMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ECheckMode c : ECheckMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ECheckMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getCheckMode
public byte getCheckMode()
-
-