Class SecureVariantKey
java.lang.Object
org.jpos.security.SecureKey
org.jpos.security.SecureVariantKey
- All Implemented Interfaces:
Serializable, Loggeable
- Direct Known Subclasses:
SecureDESKey, SecurePrivateKey
The
SecureVariantKey class wraps any keys that are secured by
the security module with variant methods.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ByteIndicates key protection variant metchod appiled to this key by a security module.Fields inherited from class SecureKey
keyBytes, keyCheckValue, keyLength, keyName, keyType, schemeModifier and TypeFieldDescriptionprotected byte[]Secure Key Bytesprotected byte[]The keyCheckValue allows identifying which clear key does this secure key represent.protected shortThis is the bit length of the key This can be: LENGTH_DES, LENGTH_DES3_2KEY, ...protected StringOptional key nameprotected StringKey Type is useful for stating what this key can be used for.protected KeySchemeKey scheme indicates protection metchod appiled to this key by a security module. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor; no instance state to initialise. -
Method Summary
Modifier and TypeMethodDescriptionabstract byteGets the key variant method used to protect this key.voidsetVariant(byte variant) Sets key protection variant metchod appiled to this key by the security module.Methods inherited from class SecureKey
getKeyBytes, getKeyCheckValue, getKeyLength, getKeyName, getKeyType, getScheme, setKeyBytes, setKeyCheckValue, setKeyLength, setKeyName, setKeyType, setSchemeModifier and TypeMethodDescriptionbyte[]Returns the secure (LMK-protected) key bytes.byte[]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).shortReturns the clear-key length in bits.Returns the optional key name.Key Type is useful for stating what this key can be used for.abstract KeySchemeGets the key scheme used to protect this key.voidsetKeyBytes(byte[] keyBytes) Sets the secure key bytesvoidsetKeyCheckValue(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).voidsetKeyLength(short keyLength) Sets the length of the key (in bits) (when it was still clear).voidsetKeyName(String keyName) Sets the optional key name.voidsetKeyType(String keyType) Key Type is useful for stating what this key can be used for.voidKey scheme indicates protection metchod appiled to this key by the security module.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Loggeable
dump, dumpModifier and TypeMethodDescriptionvoiddump(PrintStream p, String indent) Dumps a human-readable representation of this object to the print stream.default voiddump(PrintStream p, String indent, LogRenderer.Type type) Dumps a representation of this object using the specified renderer type.
-
Field Details
-
variant
-
-
Constructor Details
-
SecureVariantKey
protected SecureVariantKey()Default constructor; no instance state to initialise.
-
-
Method Details
-
setVariant
Sets key protection variant metchod appiled to this key by the security module.- Parameters:
variant- key variant method used to protect this key.
-
getVariant
Gets the key variant method used to protect this key.- Returns:
- key variant method used to protect this key.
-