DeviceResponse

data class DeviceResponse

Top-level device response in ISO 18013-5.

To construct an instance use buildDeviceResponse.

For a response received from a remote mdoc use DeviceResponse.Companion.fromDataItem. Note that you have to manually call verify before accessing the documents field for instances created this way.

Types

Link copied to clipboard
class Builder(sessionTranscript: DataItem, status: Int, eReaderKey: EcPublicKey? = null, version: String? = null)

A builder for DeviceResponse.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

a list of returned errors.

Link copied to clipboard

a list of returned documents.

Link copied to clipboard

a list of returned encrypted documents.

Link copied to clipboard
val status: Int

the status field containing for example STATUS_OK or STATUS_GENERAL_ERROR.

Link copied to clipboard

the version of the device response, e.g. 1.0 or 1.1.

Link copied to clipboard

a list of returned documents with ZKP.

Functions

Link copied to clipboard

Generates CBOR compliant with the CDDL for DeviceResponse according to ISO 18013-5.

Link copied to clipboard
suspend fun verify(sessionTranscript: DataItem, eReaderKey: AsymmetricKey? = null, atTime: Instant = Clock.System.now())

Verifies the integrity of the returned documents, according to ISO/IEC 18013-5.