PrivateKeyInfopublic 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 |
Fields Summary |
---|
private int | version | private org.apache.harmony.security.x509.AlgorithmIdentifier | privateKeyAlgorithm | private byte[] | privateKey | private List | attributes | private byte[] | encoding | public static final org.apache.harmony.security.asn1.ASN1Sequence | ASN1 |
Constructors Summary |
---|
public PrivateKeyInfo(int version, org.apache.harmony.security.x509.AlgorithmIdentifier privateKeyAlgorithm, byte[] privateKey, List attributes)
this.version = version;
this.privateKeyAlgorithm = privateKeyAlgorithm;
this.privateKey = privateKey;
this.attributes = attributes;
| private PrivateKeyInfo(int version, org.apache.harmony.security.x509.AlgorithmIdentifier privateKeyAlgorithm, byte[] privateKey, List attributes, byte[] encoding)
this(version, privateKeyAlgorithm, privateKey, attributes);
this.encoding = encoding;
|
Methods Summary |
---|
public org.apache.harmony.security.x509.AlgorithmIdentifier | getAlgorithmIdentifier()
return privateKeyAlgorithm;
| public java.util.List | getAttributes()
return attributes;
| public byte[] | getEncoded()Returns ASN.1 encoded form of this PrivateKeyInfo.
if (encoding == null) {
encoding = ASN1.encode(this);
}
return encoding;
| public byte[] | getPrivateKey()
return privateKey;
| public int | getVersion()
return version;
|
|