At work, we needed to decrypt JWE using Amazon KMS. Therefore the part that decrypts the CEK using the private key needed to make a network call. It proved difficult due to the lack of async support in the decrypt method in the JweDecrypt trait.
Changes
Introduce JweDecrypterAsync alongside the existing JweDecrypter
The decrypt function is async to allow async network call to decrypt the content encryption key using external KMS
Motivation
At work, we needed to decrypt JWE using Amazon KMS. Therefore the part that decrypts the CEK using the private key needed to make a network call. It proved difficult due to the lack of async support in the
decrypt
method in theJweDecrypt
trait.Changes
JweDecrypterAsync
alongside the existingJweDecrypter
decrypt
function is async to allow async network call to decrypt the content encryption key using external KMSasync