Package org.bouncycastle.asn1.sec
Class ECPrivateKey
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.sec.ECPrivateKey
- All Implemented Interfaces:
ASN1Encodable
,Encodable
the elliptic curve private key object from SEC 1
-
Constructor Summary
ConstructorsConstructorDescriptionECPrivateKey
(int orderBitLength, BigInteger key) Base constructor.ECPrivateKey
(int orderBitLength, BigInteger key, ASN1Encodable parameters) ECPrivateKey
(int orderBitLength, BigInteger key, DERBitString publicKey, ASN1Encodable parameters) -
Method Summary
Modifier and TypeMethodDescriptionstatic ECPrivateKey
getInstance
(Object obj) getKey()
ECPrivateKey ::= SEQUENCE { version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), privateKey OCTET STRING, parameters [0] Parameters OPTIONAL, publicKey [1] BIT STRING OPTIONAL }Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Constructor Details
-
ECPrivateKey
Base constructor.- Parameters:
orderBitLength
- the bitLength of the order of the curve.key
- the private key value.
-
ECPrivateKey
-
ECPrivateKey
public ECPrivateKey(int orderBitLength, BigInteger key, DERBitString publicKey, ASN1Encodable parameters)
-
-
Method Details
-
getInstance
-
getKey
-
getPublicKey
-
getParameters
-
toASN1Primitive
ECPrivateKey ::= SEQUENCE { version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), privateKey OCTET STRING, parameters [0] Parameters OPTIONAL, publicKey [1] BIT STRING OPTIONAL }- Specified by:
toASN1Primitive
in interfaceASN1Encodable
- Specified by:
toASN1Primitive
in classASN1Object
- Returns:
- a primitive representation of this object.
-