|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpos.security.SecureKey
org.jpos.security.SecureDESKey
public class SecureDESKey
The SecureDESKey class represents:
Single, double or triple length DES keys that are secured by a security module.
This is typically the DES key encrypted under one of the Local Master Keys of the
security module.
SecureDESKey has an extra property "Key Check Value". It allows assuring that two SecureDESKeys owned by two different parties map to the same clear key. This can be a useful manual check for successful key exchange.
NOTE: The security of SecureDESKey is totally dependent on the security of the used security module.
SMAdapter,
Serialized Form| Field Summary | |
|---|---|
protected byte[] |
keyCheckValue
The keyCheckValue allows identifying which clear key does this secure key represent. |
protected KeyScheme |
scheme
|
protected Byte |
variant
|
| Fields inherited from class org.jpos.security.SecureKey |
|---|
keyBytes, keyLength, keyName, keyType |
| Constructor Summary | |
|---|---|
SecureDESKey()
|
|
SecureDESKey(short keyLength,
String keyType,
byte[] keyBytes,
byte[] keyCheckValue)
Constructs an SecureDESKey |
|
SecureDESKey(short keyLength,
String keyType,
byte variant,
KeyScheme scheme,
byte[] keyBytes,
byte[] keyCheckValue)
Constructs an SecureDESKey |
|
SecureDESKey(short keyLength,
String keyType,
byte variant,
KeyScheme scheme,
String keyHexString,
String keyCheckValueHexString)
Constructs an SecureDESKey |
|
SecureDESKey(short keyLength,
String keyType,
String keyHexString,
String keyCheckValueHexString)
Constructs an SecureDESKey |
|
| Method Summary | |
|---|---|
void |
dump(PrintStream p,
String indent)
dumps SecureDESKey basic information |
byte[] |
getKeyCheckValue()
The Key Check Value is typically a 24-bits (3 bytes) formed by encrypting a block of zeros under the secure key when the secure key is clear (not in this class, but inside the security module). |
KeyScheme |
getScheme()
|
byte |
getVariant()
|
void |
setKeyCheckValue(byte[] keyCheckValue)
The Key Check Value is typically a 24-bits (3 bytes) formed by encrypting a block of zeros under the secure key when the secure key is clear (not in this class, but inside the security module). |
void |
setScheme(KeyScheme scheme)
Key Type Scheme is useful for stating whitch scheme variant of key type should be used. |
void |
setVariant(byte variant)
Key Type Variant is useful for stating whitch variant of key type should be used. |
| Methods inherited from class org.jpos.security.SecureKey |
|---|
getKeyBytes, getKeyLength, getKeyName, getKeyType, setKeyBytes, setKeyLength, setKeyName, setKeyType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] keyCheckValue
protected Byte variant
protected KeyScheme scheme
| Constructor Detail |
|---|
public SecureDESKey()
public SecureDESKey(short keyLength,
String keyType,
byte variant,
KeyScheme scheme,
byte[] keyBytes,
byte[] keyCheckValue)
keyLength - e.g. LENGTH_DES, LENGTH_DES3_2KEY, LENGTH_DES3_3KEYkeyType - variant - scheme - keyBytes - DES Key in the secure proprietary format of your security modulekeyCheckValue - SMAdapter
public SecureDESKey(short keyLength,
String keyType,
byte[] keyBytes,
byte[] keyCheckValue)
keyLength - e.g. LENGTH_DES, LENGTH_DES3_2KEY, LENGTH_DES3_3KEYkeyType - keyBytes - DES Key in the secure proprietary format of your security modulekeyCheckValue - SMAdapter
public SecureDESKey(short keyLength,
String keyType,
String keyHexString,
String keyCheckValueHexString)
keyLength - keyType - keyHexString - secure key represented as HexString instead of byte[]keyCheckValueHexString - key check value represented as HexString instead of byte[]
public SecureDESKey(short keyLength,
String keyType,
byte variant,
KeyScheme scheme,
String keyHexString,
String keyCheckValueHexString)
keyLength - keyType - keyHexString - secure key represented as HexString instead of byte[]keyCheckValueHexString - key check value represented as HexString instead of byte[]| Method Detail |
|---|
public void setKeyCheckValue(byte[] keyCheckValue)
keyCheckValue - public byte[] getKeyCheckValue()
public void setVariant(byte variant)
variant - public byte getVariant()
public void setScheme(KeyScheme scheme)
variant - public KeyScheme getScheme()
public void dump(PrintStream p,
String indent)
p - a PrintStream usually supplied by Loggerindent - indention string, usually suppiled by LoggerLoggeable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||