decryptDcResponse

suspend fun decryptDcResponse(response: JsonObject, nonce: ByteString, origin: String, responseEncryptionKey: AsymmetricKey?, clientId: String? = null): DcResponse

Decrypts a W3C Digital Credentials response.

Return

a OpenID4VPDcResponse or MdocApiDcResponse with the cleartext response.

Parameters

response

the W3C Digital Credentials API response.

nonce

the nonce.

origin

the origin.

responseEncryptionKey

the response encryption or null if the response isn't encrypted.

clientId

optional client_id used for signed OpenID4VP Draft 24 requests; if null, web-origin:<origin> is used for Draft 24 handover computation.