Bouncy Castle Cryptography Library 1.47

org.bouncycastle.asn1.sec
Class ECPrivateKey

java.lang.Object
  extended by org.bouncycastle.asn1.ASN1Object
      extended by org.bouncycastle.asn1.sec.ECPrivateKey
All Implemented Interfaces:
ASN1Encodable

public class ECPrivateKey
extends ASN1Object

the elliptic curve private key object from SEC 1


Constructor Summary
ECPrivateKey(java.math.BigInteger key)
           
ECPrivateKey(java.math.BigInteger key, ASN1Object parameters)
           
ECPrivateKey(java.math.BigInteger key, DERBitString publicKey, ASN1Object parameters)
           
 
Method Summary
static ECPrivateKey getInstance(java.lang.Object obj)
           
 java.math.BigInteger getKey()
           
 ASN1Primitive getParameters()
           
 DERBitString getPublicKey()
           
 ASN1Primitive toASN1Primitive()
          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
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ECPrivateKey

public ECPrivateKey(java.math.BigInteger key)

ECPrivateKey

public ECPrivateKey(java.math.BigInteger key,
                    ASN1Object parameters)

ECPrivateKey

public ECPrivateKey(java.math.BigInteger key,
                    DERBitString publicKey,
                    ASN1Object parameters)
Method Detail

getInstance

public static ECPrivateKey getInstance(java.lang.Object obj)

getKey

public java.math.BigInteger getKey()

getPublicKey

public DERBitString getPublicKey()

getParameters

public ASN1Primitive getParameters()

toASN1Primitive

public ASN1Primitive toASN1Primitive()
ECPrivateKey ::= SEQUENCE { version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), privateKey OCTET STRING, parameters [0] Parameters OPTIONAL, publicKey [1] BIT STRING OPTIONAL }

Specified by:
toASN1Primitive in interface ASN1Encodable
Specified by:
toASN1Primitive in class ASN1Object

Bouncy Castle Cryptography Library 1.47