public class SecureDESKey extends SecureVariantKey
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| Modifier and Type | Field and Description |
|---|---|
protected static java.util.regex.Pattern |
KEY_TYPE_PATTERN
Regular expression pattern representing key type string value.
|
variant| Constructor and Description |
|---|
SecureDESKey() |
SecureDESKey(short keyLength,
java.lang.String keyType,
byte[] keyBytes,
byte[] keyCheckValue)
Constructs an SecureDESKey
|
SecureDESKey(short keyLength,
java.lang.String keyType,
byte variant,
KeyScheme scheme,
byte[] keyBytes,
byte[] keyCheckValue)
Constructs an SecureDESKey
|
SecureDESKey(short keyLength,
java.lang.String keyType,
byte variant,
KeyScheme scheme,
java.lang.String keyHexString,
java.lang.String keyCheckValueHexString)
Constructs an SecureDESKey
|
SecureDESKey(short keyLength,
java.lang.String keyType,
java.lang.String keyHexString,
java.lang.String keyCheckValueHexString)
Constructs an SecureDESKey
|
| Modifier and Type | Method and Description |
|---|---|
void |
dump(java.io.PrintStream p,
java.lang.String indent)
dumps SecureDESKey basic information
|
KeyScheme |
getScheme()
Gets the key scheme used to protect this key.
|
byte |
getVariant()
Gets the key variant method used to protect this key.
|
setVariantgetKeyBytes, getKeyCheckValue, getKeyLength, getKeyName, getKeyType, setKeyBytes, setKeyCheckValue, setKeyLength, setKeyName, setKeyType, setSchemeprotected static final java.util.regex.Pattern KEY_TYPE_PATTERN
public SecureDESKey()
public SecureDESKey(short keyLength,
java.lang.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 - SMAdapterpublic SecureDESKey(short keyLength,
java.lang.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 - SMAdapterpublic SecureDESKey(short keyLength,
java.lang.String keyType,
java.lang.String keyHexString,
java.lang.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,
java.lang.String keyType,
byte variant,
KeyScheme scheme,
java.lang.String keyHexString,
java.lang.String keyCheckValueHexString)
keyLength - keyType - variant - scheme - keyHexString - secure key represented as HexString instead of byte[]keyCheckValueHexString - key check value represented as HexString instead of byte[]public byte getVariant()
SecureVariantKeygetVariant in class SecureVariantKeypublic KeyScheme getScheme()
SecureKeypublic void dump(java.io.PrintStream p,
java.lang.String indent)
p - a PrintStream usually supplied by Loggerindent - indention string, usually suppiled by LoggerLoggeable