Package org.gudy.bouncycastle.asn1.pkcs
Class PrivateKeyInfo
- java.lang.Object
-
- org.gudy.bouncycastle.asn1.ASN1Encodable
-
- org.gudy.bouncycastle.asn1.pkcs.PrivateKeyInfo
-
- All Implemented Interfaces:
DEREncodable
public class PrivateKeyInfo extends ASN1Encodable
-
-
Field Summary
Fields Modifier and Type Field Description private AlgorithmIdentifier
algId
private ASN1Set
attributes
private DERObject
privKey
-
Fields inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
BER, DER
-
-
Constructor Summary
Constructors Constructor Description PrivateKeyInfo(ASN1Sequence seq)
PrivateKeyInfo(AlgorithmIdentifier algId, DERObject privateKey)
PrivateKeyInfo(AlgorithmIdentifier algId, DERObject privateKey, ASN1Set attributes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AlgorithmIdentifier
getAlgorithmId()
ASN1Set
getAttributes()
static PrivateKeyInfo
getInstance(java.lang.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.gudy.bouncycastle.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
-
-
-
-
Field Detail
-
privKey
private DERObject privKey
-
algId
private AlgorithmIdentifier algId
-
attributes
private ASN1Set attributes
-
-
Constructor Detail
-
PrivateKeyInfo
public PrivateKeyInfo(AlgorithmIdentifier algId, DERObject privateKey)
-
PrivateKeyInfo
public PrivateKeyInfo(AlgorithmIdentifier algId, DERObject privateKey, ASN1Set attributes)
-
PrivateKeyInfo
public PrivateKeyInfo(ASN1Sequence seq)
-
-
Method Detail
-
getInstance
public static PrivateKeyInfo getInstance(ASN1TaggedObject obj, boolean explicit)
-
getInstance
public static PrivateKeyInfo getInstance(java.lang.Object obj)
-
getAlgorithmId
public AlgorithmIdentifier getAlgorithmId()
-
getPrivateKey
public DERObject getPrivateKey()
-
getAttributes
public ASN1Set getAttributes()
-
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
- Specified by:
toASN1Object
in classASN1Encodable
-
-