Class EncryptedPKCS8Parser

java.lang.Object
io.smallrye.certs.pem.parsers.EncryptedPKCS8Parser
All Implemented Interfaces:
PKPemParser

public class EncryptedPKCS8Parser extends Object implements PKPemParser
  • Field Details

  • Constructor Details

    • EncryptedPKCS8Parser

      public EncryptedPKCS8Parser()
  • Method Details

    • getKey

      public PrivateKey getKey(String content, String password)
      Extracts the private key from the encrypted PKCS#8 format.
      Specified by:
      getKey in interface PKPemParser
      Parameters:
      content - the encrypted PKCS#8 content
      password - the password to decrypt the key
      Returns:
      the private key or null if the content is not a PKCS#8 encrypted key
    • decryptKey

      public io.vertx.core.buffer.Buffer decryptKey(String content, String secret)
      Retrieves the private key as plain PKCS#8 from the encrypted PKCS#8 content.
      Parameters:
      content - the encrypted PKCS#8 content
      secret - the password to decrypt the key
      Returns:
      the decrypted PKCS#8 key or null if the content is not a PKCS#8 encrypted key