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 Details

  • Constructor Details

    • PrivateKeyInfo

      public PrivateKeyInfo​(int version, AlgorithmIdentifier privateKeyAlgorithm, byte[] privateKey, List attributes)
  • Method Details

    • getVersion

      public int getVersion()
    • getAlgorithmIdentifier

      public AlgorithmIdentifier getAlgorithmIdentifier()
    • getAttributes

      public List getAttributes()
    • getPrivateKey

      public byte[] getPrivateKey()
      Returns the OCTET STRING.
    • getEncoded

      public byte[] getEncoded()
      Returns ASN.1 encoded form of this PrivateKeyInfo.