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
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
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)
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 interface ASN1Encodable
- Specified by:
toASN1Primitive
in class ASN1Object