public class SecurePrivateKey extends SecureVariantKey implements java.io.Serializable
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)
variant| Constructor and Description |
|---|
SecurePrivateKey(java.lang.String keyType,
byte[] keyBytes)
Constructs an
SecurePrivateKey. |
| Modifier and Type | Method and Description |
|---|---|
void |
dump(java.io.PrintStream p,
java.lang.String indent)
Dumps
SecureRSAPrivateKey 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.
|
void |
setScheme(KeyScheme scheme)
Key scheme indicates protection metchod appiled to this key by
the security module.
|
void |
setVariant(byte variant)
Sets key protection variant metchod appiled to this key by the security module.
|
getKeyBytes, getKeyCheckValue, getKeyLength, getKeyName, getKeyType, setKeyBytes, setKeyCheckValue, setKeyLength, setKeyName, setKeyTypepublic SecurePrivateKey(java.lang.String keyType,
byte[] keyBytes)
SecurePrivateKey.keyType - eg. SMAdapter.TYPE_RSA_PK or SMAdapter.TYPE_RSA_SKkeyBytes - private key in the secure proprietary format of the security module.public void setVariant(byte variant)
SecureVariantKeysetVariant in class SecureVariantKeyvariant - key variant method used to protect this key.public byte getVariant()
SecureVariantKeygetVariant in class SecureVariantKeypublic void setScheme(KeyScheme scheme)
SecureKeypublic KeyScheme getScheme()
SecureKey