Class PKCS8PrivateKeyInfo


  • public class PKCS8PrivateKeyInfo
    extends Object
     
     PrivateKeyInfo ::= SEQUENCE {
              version Version,
              privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
              privateKey PrivateKey,
              attributes [0] IMPLICIT Attributes OPTIONAL
      }
    
     Version ::= INTEGER
     PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
     PrivateKey ::= OCTET STRING
     Attributes ::= SET OF Attribute
     AlgorithmIdentifier ::= SEQUENCE {
          algorithm       OBJECT IDENTIFIER,
          parameters      ANY DEFINED BY algorithm OPTIONAL
     }
     
     
    Author:
    Apache MINA SSHD Project
    See Also:
    RFC 5208 - section 5
    • Method Detail

      • setVersion

        public void setVersion​(BigInteger version)
      • getAlgorithmIdentifier

        public List<Integer> getAlgorithmIdentifier()
      • setAlgorithmIdentifier

        public void setAlgorithmIdentifier​(List<Integer> algorithmIdentifier)
      • getAlgorithmParameter

        public ASN1Object getAlgorithmParameter()
      • setAlgorithmParameter

        public void setAlgorithmParameter​(ASN1Object algorithmParameter)
      • getPrivateKeyBytes

        public ASN1Object getPrivateKeyBytes()
      • setPrivateKeyBytes

        public void setPrivateKeyBytes​(ASN1Object privateKeyBytes)
      • decode

        public void decode​(ASN1Object privateKeyInfo)
                    throws IOException
        Decodes the current information with the data from the provided encoding. Note: User should clear() the current information before parsing
        Parameters:
        privateKeyInfo - The ASN1Object encoding
        Throws:
        IOException - If failed to parse the encoding
      • clear

        public void clear()