com.pax.dal.entity

Enum EDUKPTMacMode

  • java.lang.Object
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<EDUKPTMacMode>


    public enum EDUKPTMacMode
    extends java.lang.Enum<EDUKPTMacMode>
    DUKPT的MAC算法模式定义
    DUKPT MAC Mode
    • Enum Constant Summary

      Enum Constants 
      Enum Constant and Description
      MODE_00
      将BLOCK1用MAC密钥做TDES加密,加密结果与BLOCK2进行逐位异或后再用MAC密钥做TDES加密,依次进行得到8字节的加密结果。 KSN自动加1
      Doing TDES encryption for BLOCK1 by using MAC key.
      MODE_01
      将BLOCK1和BLOCK2进行逐位异或,异或结果与BLOCK3进行逐位异或,依次进行,最后得到8字节的异或结果,将该结果用MAC密钥进行TDES加密运算。 KSN自动加1。
      Doing bitwise XOR for BLOCK1 and BLOCK2; Do bitwise XOR again by using previous XOR result with BLOCK3.
      MODE_02
      ANSIX9.19规范,将BLOCK1用MAC密钥做DES加密(只取前8个字节的key),加密结果与BLOCK2进行逐位异或后再用MAC密钥做DES加密,依次进行得到8字节的加密结果,直到最后一次采用TDES加密。 KSN自动加1。
      ANSIX9.19 standard, Do DES encryption for BLOCK1 by using MAC key (only take the first 8 bytes of key).
      MODE_05
      hmac-sha256模式。将MAC密钥作为hmac 密钥。使用DUKPT_MAC_BOTH_KEY(request and response MAC密钥),KSN 自动加 1
      hmac-sha256 mode.
      MODE_20
      将BLOCK1用MAC密钥做TDES加密,加密结果与BLOCK2进行逐位异或后再用MAC密钥做TDES加密,依次进行得到8字节的加密结果。KSN不自动加1。
      Doing TDES encryption for BLOCK1 by using MAC key.
      MODE_21
      将BLOCK1和BLOCK2进行逐位异或,异或结果与BLOCK3进行逐位异或,依次进行,最后得到8字节的异或结果,将该结果用MAC密钥进行TDES加密运算。KSN不自动加1。
      Doing bitwise XOR for BLOCK1 and BLOCK2; Do bitwise XOR again by using previous XOR result with BLOCK3.
      MODE_22
      ANSIX9.19 规范,将 BLOCK1 用 MAC 密钥做DES加密(只取前 8个字节的 key), 加密结果与 BLOCK2 进行逐位异或后再用 MAC 密钥做 DES 加密,依次进行得到 8 字节的加密结果, 直到最后一次采用TDES 加密。 KSN 不自动加 1,其它值保留扩展 MAC 算法。
      ANSIX9.19 specification, BLOCK1 use MAC key to do DES encryption (only take the first 8 bytes of the key), encryption results with BLOCK2 performs bit-by-bit XOR and then uses MAC key to do DES encryption, successively obtaining 8-byte encryption results until TDES is used for the last time Encryption.
      MODE_25
      hmac-sha256模式。将MAC密钥作为hmac 密钥。使用DUKPT_MAC_BOTH_KEY(request and response MAC密钥),KSN 不自动加1
      hmac-sha256 mode.
      MODE_40
      将BLOCK1用MAC密钥做TDES加密,加密结果与BLOCK2进行逐位异或后再用MAC密钥做TDES加密,依次进行得到8字节的加密结果。 KSN不自动加1。
      Doing TDES encryption for BLOCK1 by using MAC key.
      MODE_41
      将BLOCK1和BLOCK2进行逐位异或,异或结果与BLOCK3进行逐位异或,依次进行,最后得到8字节的异或结果,将该结果用MAC密钥进行TDES加密运算。 KSN不自动加1。
      Doing bitwise XOR for BLOCK1 and BLOCK2; Do bitwise XOR again by using previous XOR result with BLOCK3.
      MODE_42
      ANSIX9.19 规范,将 BLOCK1 用 MAC 密钥做DES加密(只取前 8个字节的 key),加密结果与 BLOCK2 进行逐位异或后再用 TAK 做 DES 加密,依次进行得到 8 字节的加密结果,直到最后一次采用 TDES加密。 KSN 不自动加 1 ,其它值保留扩展 MAC 算法。
      ANSIX9.19 specification, BLOCK1 use MAC key to do DES encryption (only take the first 8 bytes of the key), encryption results with BLOCK2 performs bit-by-bit XOR and then uses TAK to do DES encryption, successively obtaining 8-byte encryption results until the last use TDES encryption.
      MODE_45
      hmac-sha256模式。将MAC密钥作为hmac 密钥。使用DUKPT_MAC_RSP_KEY(response MAC密钥),KSN 不自动加1
      hmac-sha256 mode.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      byte getDUKPTMacMode() 
      static EDUKPTMacMode valueOf(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static EDUKPTMacMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • MODE_00

        public static final EDUKPTMacMode MODE_00
        将BLOCK1用MAC密钥做TDES加密,加密结果与BLOCK2进行逐位异或后再用MAC密钥做TDES加密,依次进行得到8字节的加密结果。 KSN自动加1
        Doing TDES encryption for BLOCK1 by using MAC key. Doing TDES encryption again by using MAC key when and after bitwise XOR the previous encryption result with BLOCK2. Processing in turn to get the 8 bytes encryption result.KSN auto-add 1
      • MODE_01

        public static final EDUKPTMacMode MODE_01
        将BLOCK1和BLOCK2进行逐位异或,异或结果与BLOCK3进行逐位异或,依次进行,最后得到8字节的异或结果,将该结果用MAC密钥进行TDES加密运算。 KSN自动加1。
        Doing bitwise XOR for BLOCK1 and BLOCK2; Do bitwise XOR again by using previous XOR result with BLOCK3. Do it in turn and finally get the 8 bytes XOR result. Using MAC key to process TDES encryption for the result.KSN auto-add 1
      • MODE_02

        public static final EDUKPTMacMode MODE_02
        ANSIX9.19规范,将BLOCK1用MAC密钥做DES加密(只取前8个字节的key),加密结果与BLOCK2进行逐位异或后再用MAC密钥做DES加密,依次进行得到8字节的加密结果,直到最后一次采用TDES加密。 KSN自动加1。
        ANSIX9.19 standard, Do DES encryption for BLOCK1 by using MAC key (only take the first 8 bytes of key). The encryption result wills bitwise XOR with BLOCK2,and then doing DES encryption by using MAC key again. Do it in turn and get the 8 bytes encryption result. Using TDES to encrypt in the last time.KSN auto-add 1
      • MODE_05

        public static final EDUKPTMacMode MODE_05
        hmac-sha256模式。将MAC密钥作为hmac 密钥。使用DUKPT_MAC_BOTH_KEY(request and response MAC密钥),KSN 自动加 1
        hmac-sha256 mode. Use the MAC key as the hmac key. Using DUKPT_MAC_BOTH_KEY (request and response MAC key), KSN is automatically incremented by 1
      • MODE_20

        public static final EDUKPTMacMode MODE_20
        将BLOCK1用MAC密钥做TDES加密,加密结果与BLOCK2进行逐位异或后再用MAC密钥做TDES加密,依次进行得到8字节的加密结果。KSN不自动加1。
        Doing TDES encryption for BLOCK1 by using MAC key. Doing TDES encryption again by using MAC key when and after bitwise XOR the previous encryption result with BLOCK2. Processing in turn to get the 8 bytes encryption result.KSN won't auto-add 1
      • MODE_21

        public static final EDUKPTMacMode MODE_21
        将BLOCK1和BLOCK2进行逐位异或,异或结果与BLOCK3进行逐位异或,依次进行,最后得到8字节的异或结果,将该结果用MAC密钥进行TDES加密运算。KSN不自动加1。
        Doing bitwise XOR for BLOCK1 and BLOCK2; Do bitwise XOR again by using previous XOR result with BLOCK3. Do it in turn and finally get the 8 bytes XOR result. Using MAC key to process TDES encryption for the result.KSN won't auto-add 1
      • MODE_22

        public static final EDUKPTMacMode MODE_22
        ANSIX9.19 规范,将 BLOCK1 用 MAC 密钥做DES加密(只取前 8个字节的 key), 加密结果与 BLOCK2 进行逐位异或后再用 MAC 密钥做 DES 加密,依次进行得到 8 字节的加密结果, 直到最后一次采用TDES 加密。 KSN 不自动加 1,其它值保留扩展 MAC 算法。
        ANSIX9.19 specification, BLOCK1 use MAC key to do DES encryption (only take the first 8 bytes of the key), encryption results with BLOCK2 performs bit-by-bit XOR and then uses MAC key to do DES encryption, successively obtaining 8-byte encryption results until TDES is used for the last time Encryption. KSN does not automatically add 1, and other values are reserved for the extended MAC algorithm.
      • MODE_25

        public static final EDUKPTMacMode MODE_25
        hmac-sha256模式。将MAC密钥作为hmac 密钥。使用DUKPT_MAC_BOTH_KEY(request and response MAC密钥),KSN 不自动加1
        hmac-sha256 mode. Use the MAC key as the hmac key. With DUKPT_MAC_BOTH_KEY (request and response MAC key), KSN is not automatically incremented by 1
      • MODE_40

        public static final EDUKPTMacMode MODE_40
        将BLOCK1用MAC密钥做TDES加密,加密结果与BLOCK2进行逐位异或后再用MAC密钥做TDES加密,依次进行得到8字节的加密结果。 KSN不自动加1。
        Doing TDES encryption for BLOCK1 by using MAC key. Doing TDES encryption again by using MAC key when and after bitwise XOR the previous encryption result with BLOCK2. Processing in turn to get the 8 bytes encryption result.KSN won't auto-add 1
      • MODE_41

        public static final EDUKPTMacMode MODE_41
        将BLOCK1和BLOCK2进行逐位异或,异或结果与BLOCK3进行逐位异或,依次进行,最后得到8字节的异或结果,将该结果用MAC密钥进行TDES加密运算。 KSN不自动加1。
        Doing bitwise XOR for BLOCK1 and BLOCK2; Do bitwise XOR again by using previous XOR result with BLOCK3. Do it in turn and finally get the 8 bytes XOR result. Using MAC key to process TDES encryption for the result.KSN won't auto-add 1
      • MODE_42

        public static final EDUKPTMacMode MODE_42
        ANSIX9.19 规范,将 BLOCK1 用 MAC 密钥做DES加密(只取前 8个字节的 key),加密结果与 BLOCK2 进行逐位异或后再用 TAK 做 DES 加密,依次进行得到 8 字节的加密结果,直到最后一次采用 TDES加密。 KSN 不自动加 1 ,其它值保留扩展 MAC 算法。
        ANSIX9.19 specification, BLOCK1 use MAC key to do DES encryption (only take the first 8 bytes of the key), encryption results with BLOCK2 performs bit-by-bit XOR and then uses TAK to do DES encryption, successively obtaining 8-byte encryption results until the last use TDES encryption. KSN does not automatically add 1, and other values are reserved for the extended MAC algorithm.
      • MODE_45

        public static final EDUKPTMacMode MODE_45
        hmac-sha256模式。将MAC密钥作为hmac 密钥。使用DUKPT_MAC_RSP_KEY(response MAC密钥),KSN 不自动加1
        hmac-sha256 mode. Use the MAC key as the hmac key. If DUKPT_MAC_RSP_KEY (response MAC key) is used, KSN is not automatically incremented by 1
    • Method Detail

      • values

        public static EDUKPTMacMode[] 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 (EDUKPTMacMode c : EDUKPTMacMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EDUKPTMacMode 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 name
        java.lang.NullPointerException - if the argument is null