Class PrivateKeyInfo

    • Constructor Detail

      • PrivateKeyInfo

        public PrivateKeyInfo​(ASN1Sequence seq)
        Deprecated.
        use PrivateKeyInfo.getInstance()
        Parameters:
        seq -
    • Method Detail

      • getInstance

        public static PrivateKeyInfo getInstance​(java.lang.Object obj)
      • 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
        Returns:
        a primitive representation of this object.