public class NativePrivateKey extends NativeKey implements PrivateKey
serialVersionUID| Constructor and Description |
|---|
NativePrivateKey(NativeReference nativeRef,
String alg) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy this
Object. |
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.
|
int |
getOutputSize()
Get the output size in bytes that an output buffer would need in order to hold the result of a decryption
operation with this private key.
|
boolean |
isDestroyed()
Determine if this
Object has been destroyed. |
getAlgorithm, getNativeIdclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlgorithmpublic NativePrivateKey(NativeReference nativeRef, String alg)
nativeRef - Reference on a native resource.alg - algorithm name.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 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 int getOutputSize()
public boolean isDestroyed()
DestroyableObject has been destroyed.
The default implementation returns false.
isDestroyed in interface DestroyableObject has been destroyed, false otherwise.