public class X509KeyImpl extends Object implements PrivateKey
serialVersionUID| Constructor and Description |
|---|
X509KeyImpl(byte[] key) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy this
Object. |
String |
getAlgorithm()
Returns the standard algorithm name for this key.
|
byte[] |
getEncoded()
Returns the key in its primary encoding format, or null if this key does not support encoding.
|
String |
getFormat()
Returns the name of the primary encoding format of this key, or null if this key does not support encoding.
|
byte[] |
getKey() |
int |
getKeyLength() |
boolean |
isDestroyed()
Determine if this
Object has been destroyed. |
public void destroy()
throws DestroyFailedException
DestroyableObject.
Sensitive information associated with this Object is destroyed or cleared. Subsequent calls to certain
methods on this Object will result in an IllegalStateException being thrown.
The default implementation throws DestroyFailedException.
destroy in interface DestroyableDestroyFailedException - if the destroy operation fails.
public String getAlgorithm()
KeygetAlgorithm in interface Keypublic byte[] getEncoded()
KeygetEncoded in interface Keypublic String getFormat()
Key"X.509". Similarly, the name of
the ASN.1 data format for private keys is PrivateKeyInfo, as defined by the PKCS #8 standard; in this
case, the returned format is "PKCS#8".public byte[] getKey()
public int getKeyLength()
public boolean isDestroyed()
DestroyableObject has been destroyed.
The default implementation returns false.
isDestroyed in interface DestroyableObject has been destroyed, false otherwise.