Package org.jpos.security
Class KeyUsage
- java.lang.Object
-
- org.jpos.security.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 Summary
Fields Modifier and Type Field Description static KeyUsage
BDK
TR-31 BDK Base Derivation Key.static KeyUsage
CVK
TR-31 CVK Card Verification Key.static KeyUsage
EMVACMK
TR-31 Application Cryptograms Key.static KeyUsage
EMVCPMK
TR-31 Card Personalization Key.static KeyUsage
EMVDAMK
TR-31 Data Authentication Code Key.static KeyUsage
EMVDNMK
TR-31 Dynamic Numbers Key.static KeyUsage
EMVMPMK
TR-31 Master Personalization Key.static KeyUsage
EMVOTMK
TR-31 Chip card Master Key.static KeyUsage
EMVSCMK
TR-31 Secure Messaging for Confidentiality Key.static KeyUsage
EMVSIMK
TR-31 Secure Messaging for Integrity.static KeyUsage
ENC
TR-31 Data Encryption Key.static KeyUsage
IKEY
TR-31 DUKPT Initial Key (IKEY aka IPEK).static KeyUsage
INIT
TR-31 Initialization Value.static KeyUsage
ISOMAC0
TR-31 ISO 16609 MAC algorithm 1 Key (using 3-DES).static KeyUsage
ISOMAC1
TR-31 ISO 9797-1 MAC algorithm 1 Key.static KeyUsage
ISOMAC2
TR-31 ISO 9797-1 MAC algorithm 2 Key.static KeyUsage
ISOMAC3
TR-31 ISO 9797-1 MAC algorithm 3 Key.static KeyUsage
ISOMAC4
TR-31 ISO 9797-1 MAC algorithm 4 Key.static KeyUsage
ISOMAC5
TR-31 ISO 9797-1 MAC algorithm 5 Key.static KeyUsage
KEK
TR-31 Generic Key Encryption / Wrapping Key.static KeyUsage
KEKWRAP
TR-31 Key Block Protection Key.static KeyUsage
PINENC
TR-31 Generic PIN Encription Key.static KeyUsage
PINV3624
TR-31 PIN Verification Key (IBM 3624 algorithm).static KeyUsage
PINVER
TR-31 Generic PIN Verification Key.protected static java.util.Map<java.lang.String,KeyUsage>
TR31MAP
static KeyUsage
VISAPVV
TR-31 PIN Verification Key (Visa PVV algorithm).
-
Constructor Summary
Constructors Modifier Constructor Description protected
KeyUsage(java.lang.String code, java.lang.String name)
Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,KeyUsage>
entries()
java.lang.String
getCode()
Get key usage code.java.lang.String
getName()
Get key usage name.java.lang.String
toString()
static KeyUsage
valueOfByCode(java.lang.String code)
Returns the enum constant of this type with the specifiedcode
.
-
-
-
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 codename
- 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 classjava.lang.Object
-
valueOfByCode
public static KeyUsage valueOfByCode(java.lang.String code)
Returns the enum constant of this type with the specifiedcode
.- Parameters:
code
-- Returns:
- the enum constant with the specified processing code or
null
if unknown.
-
-