public class NativePublicKey extends NativeKey implements PublicKey
serialVersionUID| Constructor and Description |
|---|
NativePublicKey(NativeReference nativeRef,
String alg) |
| Modifier and Type | Method and Description |
|---|---|
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 an encryption
operation with this public key.
|
getAlgorithm, getNativeIdclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlgorithmpublic NativePublicKey(NativeReference nativeRef, String alg)
nativeRef - Reference on a native resource.alg - algorithm name.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()