DeviceResponseGenerator

class DeviceResponseGenerator(mStatusCode: Long)

Helper class for building DeviceResponse CBOR as specified in ISO/IEC 18013-5 section 8.3 Device Retrieval.

Parameters

statusCode

the status code to use which must be one of Constants.DEVICE_RESPONSE_STATUS_OK, Constants.DEVICE_RESPONSE_STATUS_GENERAL_ERROR, Constants.DEVICE_RESPONSE_STATUS_CBOR_DECODING_ERROR, or Constants.DEVICE_RESPONSE_STATUS_CBOR_VALIDATION_ERROR.

Constructors

Link copied to clipboard
constructor(mStatusCode: Long)

Functions

Link copied to clipboard
fun addDocument(docType: String, encodedDeviceNamespaces: ByteArray, encodedDeviceSignature: ByteArray?, encodedDeviceMac: ByteArray?, issuerNameSpaces: Map<String?, List<ByteArray?>>, errors: Map<String?, Map<String?, Long?>>?, encodedIssuerAuth: ByteArray): DeviceResponseGenerator

Adds a new document to the device response.

Link copied to clipboard

Adds a new ZK document to the devices response.

Link copied to clipboard

Builds the DeviceResponse CBOR.

Link copied to clipboard

Checks if any documents have been added to the device response.