Package org.bouncycastle.asn1.pkcs
Class PrivateKeyInfo
- java.lang.Object
-
- org.bouncycastle.asn1.ASN1Object
-
- org.bouncycastle.asn1.pkcs.PrivateKeyInfo
-
- All Implemented Interfaces:
ASN1Encodable,Encodable
public class PrivateKeyInfo extends ASN1Object
-
-
Constructor Summary
Constructors Constructor Description PrivateKeyInfo(ASN1Sequence seq)Deprecated.use PrivateKeyInfo.getInstance()PrivateKeyInfo(AlgorithmIdentifier algId, ASN1Encodable privateKey)PrivateKeyInfo(AlgorithmIdentifier algId, ASN1Encodable privateKey, ASN1Set attributes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AlgorithmIdentifiergetAlgorithmId()Deprecated.use getPrivateKeyAlgorithm()ASN1SetgetAttributes()static PrivateKeyInfogetInstance(Object obj)static PrivateKeyInfogetInstance(ASN1TaggedObject obj, boolean explicit)ASN1PrimitivegetPrivateKey()Deprecated.use parsePrivateKey()AlgorithmIdentifiergetPrivateKeyAlgorithm()ASN1EncodableparsePrivateKey()ASN1PrimitivetoASN1Primitive()write out an RSA private key with its associated information as described in PKCS8.-
Methods inherited from class org.bouncycastle.asn1.ASN1Object
equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object
-
-
-
-
Constructor Detail
-
PrivateKeyInfo
public PrivateKeyInfo(AlgorithmIdentifier algId, ASN1Encodable privateKey) throws IOException
- Throws:
IOException
-
PrivateKeyInfo
public PrivateKeyInfo(AlgorithmIdentifier algId, ASN1Encodable privateKey, ASN1Set attributes) throws IOException
- Throws:
IOException
-
PrivateKeyInfo
public PrivateKeyInfo(ASN1Sequence seq)
Deprecated.use PrivateKeyInfo.getInstance()- Parameters:
seq-
-
-
Method Detail
-
getInstance
public static PrivateKeyInfo getInstance(ASN1TaggedObject obj, boolean explicit)
-
getInstance
public static PrivateKeyInfo getInstance(Object obj)
-
getPrivateKeyAlgorithm
public AlgorithmIdentifier getPrivateKeyAlgorithm()
-
getAlgorithmId
public AlgorithmIdentifier getAlgorithmId()
Deprecated.use getPrivateKeyAlgorithm()
-
parsePrivateKey
public ASN1Encodable parsePrivateKey() throws IOException
- Throws:
IOException
-
getPrivateKey
public ASN1Primitive getPrivateKey()
Deprecated.use parsePrivateKey()
-
getAttributes
public ASN1Set getAttributes()
-
toASN1Primitive
public ASN1Primitive toASN1Primitive()
write out an RSA private key with its associated 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:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-
-