Interface CBORX509Decrypter.DecrypterImpl

Enclosing class:
CBORX509Decrypter

public static interface CBORX509Decrypter.DecrypterImpl
Decrypter engine implementation interface.
  • Method Details

    • locate

      PrivateKey locate(X509Certificate[] certificatePath, KeyEncryptionAlgorithms keyEncryptionAlgorithm, ContentEncryptionAlgorithms contentEncryptionAlgorithm)
      Locates private decryption key.

      Implementations should preferably throw CryptoException for errors related to cryptography and security.

      This interface also enables encryption parameter verification.

      Parameters:
      certificatePath - Certificate path in the encryption objectt
      keyEncryptionAlgorithm - The requested key encryption algorithm
      contentEncryptionAlgorithm - The requested content encryption algorithm
      Returns:
      Private decryption key.
    • decrypt

      byte[] decrypt(PrivateKey privateKey, byte[] optionalEncryptedKey, PublicKey optionalEphemeralKey, KeyEncryptionAlgorithms keyEncryptionAlgorithm, ContentEncryptionAlgorithms contentEncryptionAlgorithm)
      Decrypts encrypted key.

      Implementations should preferably throw CryptoException for errors related to cryptography and security.

      *
      Parameters:
      privateKey - The private decryption key
      optionalEncryptedKey - Optional encrypted key
      optionalEphemeralKey - Optional ephemeral key
      keyEncryptionAlgorithm - The requested key encryption algorithm
      contentEncryptionAlgorithm - The requested content encryption algorithm
      Returns:
      Decrypted key.