Class SecurePrivateKey
java.lang.Object
org.jpos.security.SecureKey
org.jpos.security.SecureVariantKey
org.jpos.security.SecurePrivateKey
- All Implemented Interfaces:
Serializable, Loggeable
The
SecurePrivateKey class wraps any private key, which is protected
by the security module with variant methods.
The wrapped private key should be in the secure proprietary format of the security module.
The keyType indicates type of private key (currently only RSA
keys are supported - others may be in future)
- See Also:
-
Field Summary
Fields inherited from class SecureVariantKey
variant -
Constructor Summary
ConstructorsConstructorDescriptionSecurePrivateKey(String keyType, byte[] keyBytes) Constructs anSecurePrivateKey. -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(PrintStream p, String indent) DumpsSecureRSAPrivateKeybasic information.Gets the key scheme used to protect this key.byteGets the key variant method used to protect this key.voidKey scheme indicates protection metchod appiled to this key by the security module.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, setKeyBytes, setKeyCheckValue, setKeyLength, setKeyName, setKeyType
-
Constructor Details
-
SecurePrivateKey
Constructs anSecurePrivateKey.- Parameters:
keyType- eg.SMAdapter.TYPE_RSA_PKorSMAdapter.TYPE_RSA_SKkeyBytes- private key in the secure proprietary format of the security module.
-
-
Method Details
-
setVariant
Description copied from class:SecureVariantKeySets key protection variant metchod appiled to this key by the security module.- Overrides:
setVariantin classSecureVariantKey- Parameters:
variant- key variant method used to protect this key.
-
getVariant
Description copied from class:SecureVariantKeyGets the key variant method used to protect this key.- Specified by:
getVariantin classSecureVariantKey- Returns:
- key variant method used to protect this key.
-
setScheme
-
getScheme
-
dump
-