Package org.webpki.cbor
Interface CBORAsymKeyDecrypter.DecrypterImpl
- Enclosing class:
CBORAsymKeyDecrypter
public static interface CBORAsymKeyDecrypter.DecrypterImpl
Decrypter engine implementation interface.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
decrypt
(PublicKey optionalPublicKey, CBORObject optionalKeyId, byte[] optionalEncryptedKey, PublicKey optionalEphemeralKey, KeyEncryptionAlgorithms keyEncryptionAlgorithm, ContentEncryptionAlgorithms contentEncryptionAlgorithm) Decrypt encrypted key.
-
Method Details
-
decrypt
byte[] decrypt(PublicKey optionalPublicKey, CBORObject optionalKeyId, byte[] optionalEncryptedKey, PublicKey optionalEphemeralKey, KeyEncryptionAlgorithms keyEncryptionAlgorithm, ContentEncryptionAlgorithms contentEncryptionAlgorithm) Decrypt encrypted key.This interface assumes that the private key resides in an external hardware or software solution. The private key is either implicit or located by the
optionalPublicKey
oroptionalKeyId
parameters.Implementations must throw
CryptoException
for errors related to cryptography and security.- Parameters:
optionalPublicKey
- Defined it provided in the CEF objectoptionalKeyId
- Defined if provided in the CEF objectoptionalEncryptedKey
- Optional encrypted key (algorithm dependent)optionalEphemeralKey
- Optional ephemeral key (algorithm dependent)keyEncryptionAlgorithm
- The requested key encryption algorithmcontentEncryptionAlgorithm
- The requested content encryption algorithm- Returns:
- Decrypted key.
-