Class KeyUsage

java.lang.Object
org.jpos.security.KeyUsage
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ExtKeyUsage

public class KeyUsage extends Object implements Serializable
Defines the primary usage of the key contained in the key block.

Each value repesents bytes 5-6 of the keyblock header.

See Also:
  • Field Details

    • TR31MAP

      protected static final Map<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.
    • EMVDNMK

      public static final KeyUsage EMVDNMK
      TR-31 Dynamic Numbers 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 Details

    • KeyUsage

      protected KeyUsage(String code, 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 Details

    • getCode

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

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

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

      public static KeyUsage valueOfByCode(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 Map<String,KeyUsage> entries()