Class KeyUsage

  • Direct Known Subclasses:
    ExtKeyUsage

    public class KeyUsage
    extends java.lang.Object
    Defines the primary usage of the key contained in the key block.

    Each value repesents bytes 5-6 of the Keyblok Header.

    • Field Detail

      • TR31MAP

        protected static final java.util.Map<java.lang.String,​KeyUsage> TR31MAP
      • BDK

        public static final KeyUsage BDK
        TR-31 BDK Base Derivation Key.
      • IKEY

        public static final KeyUsage IKEY
        TR-31 DUKPT Initial Key (IKEY aka IPEK).
      • CVK

        public static final KeyUsage CVK
        TR-31 CVK Card Verification Key.
      • ENC

        public static final KeyUsage ENC
        TR-31 Data Encryption Key.
      • INIT

        public static final KeyUsage INIT
        TR-31 Initialization Value.

        Used for protect eg. Initalization Vector or Decimalization Table.

      • KEK

        public static final KeyUsage KEK
        TR-31 Generic Key Encryption / Wrapping Key.
      • KEKWRAP

        public static final KeyUsage KEKWRAP
        TR-31 Key Block Protection Key.
      • ISOMAC0

        public static final KeyUsage ISOMAC0
        TR-31 ISO 16609 MAC algorithm 1 Key (using 3-DES).
      • ISOMAC1

        public static final KeyUsage ISOMAC1
        TR-31 ISO 9797-1 MAC algorithm 1 Key.
      • ISOMAC2

        public static final KeyUsage ISOMAC2
        TR-31 ISO 9797-1 MAC algorithm 2 Key.
      • ISOMAC3

        public static final KeyUsage ISOMAC3
        TR-31 ISO 9797-1 MAC algorithm 3 Key.
      • ISOMAC4

        public static final KeyUsage ISOMAC4
        TR-31 ISO 9797-1 MAC algorithm 4 Key.
      • ISOMAC5

        public static final KeyUsage ISOMAC5
        TR-31 ISO 9797-1 MAC algorithm 5 Key.
      • PINENC

        public static final KeyUsage PINENC
        TR-31 Generic PIN Encription Key.
      • PINVER

        public static final KeyUsage PINVER
        TR-31 Generic PIN Verification Key.
      • PINV3624

        public static final KeyUsage PINV3624
        TR-31 PIN Verification Key (IBM 3624 algorithm).
      • VISAPVV

        public static final KeyUsage VISAPVV
        TR-31 PIN Verification Key (Visa PVV algorithm).
      • EMVACMK

        public static final KeyUsage EMVACMK
        TR-31 Application Cryptograms Key.
      • EMVSCMK

        public static final KeyUsage EMVSCMK
        TR-31 Secure Messaging for Confidentiality Key.
      • EMVSIMK

        public static final KeyUsage EMVSIMK
        TR-31 Secure Messaging for Integrity.
      • EMVDAMK

        public static final KeyUsage EMVDAMK
        TR-31 Data Authentication Code Key.
      • EMVCPMK

        public static final KeyUsage EMVCPMK
        TR-31 Card Personalization Key.
      • EMVOTMK

        public static final KeyUsage EMVOTMK
        TR-31 Chip card Master Key.
      • EMVMPMK

        public static final KeyUsage EMVMPMK
        TR-31 Master Personalization Key.
    • Constructor Detail

      • KeyUsage

        protected KeyUsage​(java.lang.String code,
                           java.lang.String name)
        Internal constructor.

        The constructor is protected to guarantee only one instance of the key usage in the entire JVM. This makes it possible to use the operator == or != as it does for enums.

        Parameters:
        code - the key usage code
        name - the usage name
    • Method Detail

      • getCode

        public java.lang.String getCode()
        Get key usage code.
        Returns:
        two characters which represents key usage code
      • getName

        public java.lang.String getName()
        Get key usage name.
        Returns:
        the key usage name
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • valueOfByCode

        public static KeyUsage valueOfByCode​(java.lang.String code)
        Returns the enum constant of this type with the specified code.
        Parameters:
        code -
        Returns:
        the enum constant with the specified processing code or null if unknown.
      • entries

        public static java.util.Map<java.lang.String,​KeyUsageentries()