org.bouncycastle.asn1.pkcs

Class PrivateKeyInfo

Implemented Interfaces:
DEREncodable

public class PrivateKeyInfo
extends ASN1Encodable

Constructor Summary

PrivateKeyInfo(ASN1Sequence seq)
PrivateKeyInfo(AlgorithmIdentifier algId, DERObject privateKey)

Method Summary

AlgorithmIdentifier
getAlgorithmId()
ASN1Set
getAttributes()
static PrivateKeyInfo
getInstance(Object obj)
static PrivateKeyInfo
getInstance(ASN1TaggedObject obj, boolean explicit)
DERObject
getPrivateKey()
DERObject
toASN1Object()
write out an RSA private key with it's asscociated information as described in PKCS8.

Methods inherited from class org.bouncycastle.asn1.ASN1Encodable

equals, getDERObject, getEncoded, hashCode, toASN1Object

Constructor Details

PrivateKeyInfo

public PrivateKeyInfo(ASN1Sequence seq)


PrivateKeyInfo

public PrivateKeyInfo(AlgorithmIdentifier algId,
                      DERObject privateKey)

Method Details

getAlgorithmId

public AlgorithmIdentifier getAlgorithmId()


getAttributes

public ASN1Set getAttributes()


getInstance

public static PrivateKeyInfo getInstance(Object obj)


getInstance

public static PrivateKeyInfo getInstance(ASN1TaggedObject obj,
                                         boolean explicit)


getPrivateKey

public DERObject getPrivateKey()


toASN1Object

public DERObject toASN1Object()
write out an RSA private key with it's asscociated information as described in PKCS8.
      PrivateKeyInfo ::= SEQUENCE {
                              version Version,
                              privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}},
                              privateKey PrivateKey,
                              attributes [0] IMPLICIT Attributes OPTIONAL 
                          }
      Version ::= INTEGER {v1(0)} (v1,...)

      PrivateKey ::= OCTET STRING

      Attributes ::= SET OF Attribute
 
Overrides:
toASN1Object in interface ASN1Encodable