decrypt
suspend fun decrypt(recipientPrivateKey: AsymmetricKey, encryptionParameters: EncryptionParameters, sessionTranscript: DataItem, transactionDataList: List<List<TransactionData<*>>> = emptyList(), atTime: Instant = Clock.System.now(), deviceRequest: DeviceRequest? = null, documentTypeRepository: DocumentTypeRepository? = null): EncryptedDocumentsPlaintext
Decrypts the encrypted documents.
After decryption, the same verification checks as in DeviceResponse.verify are performed to verify the integrity of the returned documents.
Return
Parameters
recipientPrivateKey
the private key used for decryption.
encryptionParameters
the same EncryptionParameters as transferred in the DeviceRequest.
sessionTranscript
the session transcript.
transactionDataList
list of transaction for each document in this EncryptedDocuments
atTime
the point in time for validating whether returned documents are valid.
deviceRequest
the DeviceRequest to which this response is given; required when decrypting dc+sd-jwt documents in EncryptedDocumentsPlaintext.otherDocuments.
documentTypeRepository
optional DocumentTypeRepository used to resolve verifier-approved dc+sd-jwt vct aliases via org.multipaz.documenttype.JsonDocumentType.otherVcts.