@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class EllipticCurvePrivateKey extends DecodedPrivateKey
ECPrivateKey ::= SEQUENCE { version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), privateKey OCTET STRING, parameters [0] ECParameters {{ NamedCurve }} OPTIONAL, publicKey [1] BIT STRING OPTIONAL }
Modifier and Type | Method and Description |
---|---|
OID |
getNamedCurveOID()
Retrieves the OID for the named curve with which this private key is
associated, if available.
|
byte[] |
getPrivateKeyBytes()
Retrieves the bytes that make up the actual elliptic curve private key.
|
ASN1BitString |
getPublicKey()
Retrieves the encoded public key with which this private key is associated,
if available.
|
int |
getVersion()
Retrieves the version for the elliptic curve private key.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this decoded private key to the provided
buffer.
|
toString
public int getVersion()
@NotNull public byte[] getPrivateKeyBytes()
@Nullable public OID getNamedCurveOID()
null
if it was not included in the encoded
key.@Nullable public ASN1BitString getPublicKey()
null
if it was not included in the encoded key.public void toString(@NotNull java.lang.StringBuilder buffer)
toString
in class DecodedPrivateKey
buffer
- The buffer to which the information should be appended.