Document

class Document

An object used to represent data parsed from the Document CBOR (part of DeviceResponse) as specified in ISO/IEC 18013-5 section 8.3 Device Retrieval.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
lateinit var deviceKey: EcPublicKey

Returns the DeviceKey from the MSO.

Link copied to clipboard

The names of namespaces with retrieved entries of the device-signed data.

Link copied to clipboard

Returns whether the DeviceSigned data was authenticated.

Link copied to clipboard

Returns whether DeviceSigned was authenticated using ECDSA signature or using a MAC.

Link copied to clipboard
lateinit var docType: String

The docType.

Link copied to clipboard

Returns the certificate chain for the issuer which signed the data in the document.

Link copied to clipboard

The names of namespaces with retrieved entries of the issuer-signed data.

Link copied to clipboard

Returns whether the IssuerSigned data was authenticated.

Link copied to clipboard

The number of issuer entries for that didn't match the digest in the MSO.

Link copied to clipboard

The expectedUpdate date from the MSO or null if not set.

Link copied to clipboard
lateinit var validityInfoSigned: Instant

The signed date from the MSO.

Link copied to clipboard
lateinit var validityInfoValidFrom: Instant

The validFrom date from the MSO.

Link copied to clipboard
lateinit var validityInfoValidUntil: Instant

The validUntil date from the MSO.

Functions

Link copied to clipboard
fun getDeviceEntryBoolean(namespaceName: String, name: String): Boolean

Like getDeviceEntryData but returns the CBOR decoded as a boolean.

Link copied to clipboard
fun getDeviceEntryByteString(namespaceName: String, name: String): ByteArray

Like getDeviceEntryData but returns the CBOR decoded as a byte-string.

Link copied to clipboard
fun getDeviceEntryData(namespaceName: String, name: String): ByteArray

Gets the raw CBOR data for the value of given data element in a given namespace in device-signed data.

Link copied to clipboard
fun getDeviceEntryDateTime(namespaceName: String, name: String): Instant

Like getDeviceEntryData but returns the CBOR decoded as an Instant.

Link copied to clipboard
fun getDeviceEntryNames(namespaceName: String): List<String>

Gets the names of data elements in the given device-signed namespace.

Link copied to clipboard
fun getDeviceEntryNumber(namespaceName: String, name: String): Long

Like getDeviceEntryData but returns the CBOR decoded as a long.

Link copied to clipboard
fun getDeviceEntryString(namespaceName: String, name: String): String

Like getDeviceEntryData but returns the CBOR decoded as a string.

Link copied to clipboard
fun getIssuerEntryBoolean(namespaceName: String, name: String): Boolean

Like getIssuerEntryData but returns the CBOR decoded as a boolean.

Link copied to clipboard
fun getIssuerEntryByteString(namespaceName: String, name: String): ByteArray

Like getIssuerEntryData but returns the CBOR decoded as a byte-string.

Link copied to clipboard
fun getIssuerEntryData(namespaceName: String, name: String): ByteArray

Gets the raw CBOR data for the value of given data element in a given namespace in issuer-signed data.

Link copied to clipboard
fun getIssuerEntryDateTime(namespaceName: String, name: String): Instant

Like getIssuerEntryData but returns the CBOR decoded as an Instant.

Link copied to clipboard
fun getIssuerEntryDigestMatch(namespaceName: String, name: String): Boolean

Gets whether the digest for the given entry matches the digest in the MSO.

Link copied to clipboard
fun getIssuerEntryNames(namespaceName: String): List<String>

Gets the names of data elements in the given issuer-signed namespace.

Link copied to clipboard
fun getIssuerEntryNumber(namespaceName: String, name: String): Long

Like getIssuerEntryData but returns the CBOR decoded as a long.

Link copied to clipboard
fun getIssuerEntryString(namespaceName: String, name: String): String

Like getIssuerEntryData but returns the CBOR decoded as a string.