public abstract class KeychainPrivateKey
extends java.lang.Object
implements com.entrust.toolkit.security.provider.EntrustPrivateKey
| Constructor and Description |
|---|
KeychainPrivateKey(KeychainKey key)
The constructor for a KeychainPrivateKey.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes the private key.
|
void |
destroyCriticalData()
Destroy the Critical Data for this Keychain Private Key
|
abstract java.lang.String |
getAlgorithm()
The abstract method getAlgorithm which all Keychain key types will return
|
byte[] |
getEncoded()
Returns the key in its primary encoding format, or null
if this key does not support encoding.
|
java.lang.String |
getFormat()
Returns the name of the primary encoding format of this key,
or null if this key does not support encoding.
|
static KeychainPrivateKey |
getInstance(KeychainKey keychainKey)
Creates and returns a
KeyChainPrivateKey using with an already initialized
Keychainkey. |
static KeychainPrivateKey |
getInstance(X509Certificate cert)
Get an instance of a KeychainPrivateKey that is associated with the specified certificate.
|
KeychainKey |
getKeychainKey() |
java.lang.String |
getType()
Returns the type of this private key.
|
public KeychainPrivateKey(KeychainKey key) throws KeychainException
key - the keychainKeyKeychainExceptionpublic static KeychainPrivateKey getInstance(KeychainKey keychainKey) throws KeychainException
KeyChainPrivateKey using with an already initialized
Keychainkey.keychainKey - the handle to the key within the KeychainKeychainPrivateKey of the correct type.KeychainException - if there is no private key type associated with cryptKey.public static KeychainPrivateKey getInstance(X509Certificate cert) throws KeychainException
cert - The certificate to use to search for the private keyKeychainExceptionpublic KeychainKey getKeychainKey()
public void destroyCriticalData()
public java.lang.String getType()
PrivateKeyCurrently, the following private key types are supported in the Toolkit:
ConfinedPrivateKeyTokenPrivateKeyCapiPrivateKeyCapiDummyPrivateKeypublic abstract java.lang.String getAlgorithm()
getAlgorithm in interface java.security.Keypublic java.lang.String getFormat()
getFormat in interface java.security.Keypublic byte[] getEncoded()
getEncoded in interface java.security.Keypublic void delete()
throws java.security.KeyException
The effect of this operation depends on the underlying key type. For keys stored in the Keychain it deletes the key from the Keychain
delete in interface com.entrust.toolkit.security.provider.EntrustPrivateKeyjava.security.KeyException - if an error occurs while attempting to delete the key