Class PrivateKeyInfo
java.lang.Object
org.apache.harmony.security.pkcs8.PrivateKeyInfo
public final class PrivateKeyInfo extends Object
The class implements the ASN.1 DER encoding and decoding of the PKCS#8
PrivateKeyInfo having the following ASN.1 notation:
PrivateKeyInfo ::= SEQUENCE {
version Version,
privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
privateKey PrivateKey,
attributes [0] IMPLICIT Attributes OPTIONAL }
Version ::= INTEGER
PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
PrivateKey ::= OCTET STRING
Attributes ::= SET OF Attribute
-
Field Summary
Fields Modifier and Type Field Description static ASN1SequenceASN1 -
Constructor Summary
Constructors Constructor Description PrivateKeyInfo(int version, AlgorithmIdentifier privateKeyAlgorithm, byte[] privateKey, List attributes) -
Method Summary
Modifier and Type Method Description AlgorithmIdentifiergetAlgorithmIdentifier()ListgetAttributes()byte[]getEncoded()Returns ASN.1 encoded form of this PrivateKeyInfo.byte[]getPrivateKey()Returns the OCTET STRING.intgetVersion()
-
Field Details
-
ASN1
-
-
Constructor Details
-
PrivateKeyInfo
public PrivateKeyInfo(int version, AlgorithmIdentifier privateKeyAlgorithm, byte[] privateKey, List attributes)
-
-
Method Details
-
getVersion
public int getVersion() -
getAlgorithmIdentifier
-
getAttributes
-
getPrivateKey
public byte[] getPrivateKey()Returns the OCTET STRING. -
getEncoded
public byte[] getEncoded()Returns ASN.1 encoded form of this PrivateKeyInfo.
-