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 AlgorithmIdentifier
getAlgorithmId()
Deprecated.use getPrivateKeyAlgorithm()ASN1Set
getAttributes()
static PrivateKeyInfo
getInstance(java.lang.Object obj)
static PrivateKeyInfo
getInstance(ASN1TaggedObject obj, boolean explicit)
ASN1Primitive
getPrivateKey()
Deprecated.use parsePrivateKey()AlgorithmIdentifier
getPrivateKeyAlgorithm()
ASN1Encodable
parsePrivateKey()
ASN1Primitive
toASN1Primitive()
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 java.io.IOException
- Throws:
java.io.IOException
-
PrivateKeyInfo
public PrivateKeyInfo(AlgorithmIdentifier algId, ASN1Encodable privateKey, ASN1Set attributes) throws java.io.IOException
- Throws:
java.io.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(java.lang.Object obj)
-
getPrivateKeyAlgorithm
public AlgorithmIdentifier getPrivateKeyAlgorithm()
-
getAlgorithmId
public AlgorithmIdentifier getAlgorithmId()
Deprecated.use getPrivateKeyAlgorithm()
-
parsePrivateKey
public ASN1Encodable parsePrivateKey() throws java.io.IOException
- Throws:
java.io.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:
toASN1Primitive
in interfaceASN1Encodable
- Specified by:
toASN1Primitive
in classASN1Object
- Returns:
- a primitive representation of this object.
-
-