Package org.bouncycastle.asn1.pkcs
Class PrivateKeyInfo
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.pkcs.PrivateKeyInfo
- All Implemented Interfaces:
ASN1Encodable
public class PrivateKeyInfo extends ASN1Object
-
Constructor Summary
Constructors Constructor Description PrivateKeyInfo(ASN1Sequence seq)PrivateKeyInfo(AlgorithmIdentifier algId, ASN1Encodable privateKey)PrivateKeyInfo(AlgorithmIdentifier algId, ASN1Encodable privateKey, ASN1Set attributes) -
Method Summary
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 Details
-
PrivateKeyInfo
- Throws:
IOException
-
PrivateKeyInfo
public PrivateKeyInfo(AlgorithmIdentifier algId, ASN1Encodable privateKey, ASN1Set attributes) throws IOException- Throws:
IOException
-
PrivateKeyInfo
- Parameters:
seq-
-
-
Method Details
-
getInstance
-
getInstance
-
getPrivateKeyAlgorithm
-
getAlgorithmId
Deprecated.use getPrivateKeyAlgorithm() -
parsePrivateKey
- Throws:
IOException
-
getPrivateKey
Deprecated.use parsePrivateKey() -
getAttributes
-
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
-