Interface CBORAsymKeyDecrypter.DecrypterImpl

Enclosing class:
CBORAsymKeyDecrypter

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

    • locate

      PrivateKey locate(PublicKey optionalPublicKey, CBORObject optionalKeyId, 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:
      optionalPublicKey - Optional public key found in the encryption object
      optionalKeyId - Optional key Id found in the encryption object
      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.