decrypt

fun decrypt(encryptedJwt: String, recipientKey: EcPrivateKey): JsonObject

Decrypts an encrypted JWT using ECDH-ES.

Reference: RFC 7518 Section 4.6 Key Agreement with Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES)

Return

the decrypted claims set.

Parameters

encryptedJwt

the compact serialization of the JWE.

recipientKey

the recipients private key corresponding to the public key this was encrypted to.