Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
@Serializable
data class ClientIdToHash(val clientId: String, val mdocGeneratedNonce: String)

Part of the ISO/IEC 18013-7:2024 standard: Session Transcript (B.4.4)

Link copied to clipboard
@Serializable
data class DeviceAuth(val deviceSignature: CoseSigned<ByteArray>? = null, val deviceMac: CoseSigned<ByteArray>? = null)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for mdoc request (8.3.2.1.2.1)

Link copied to clipboard
@Serializable
data class DeviceAuthentication(val type: String, val sessionTranscript: SessionTranscript, val docType: String, val namespaces: ByteStringWrapper<DeviceNameSpaces>)

Part of the ISO/IEC 18013-5:2021 standard: mdoc authentication (9.1.3.4).

Link copied to clipboard
@Serializable
data class DeviceKeyInfo(val deviceKey: CoseKey, val keyAuthorizations: KeyAuthorization? = null, val keyInfo: Map<Int, String>? = null)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for MSO (9.1.2.4)

Link copied to clipboard

Convenience class to prevent usage of the type ByteStringWrapper<Map<String, Map<String, Any>>> in DeviceSigned.namespaces.

Link copied to clipboard
@Serializable
data class DeviceRequest(val version: String, val docRequests: Array<DocRequest>)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for mdoc request (8.3.2.1.2.1)

Link copied to clipboard
@Serializable
data class DeviceResponse(val version: String, val documents: Array<Document>? = null, val documentErrors: Array<Pair<String, UInt>>? = null, val status: UInt)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for mdoc request (8.3.2.1.2.1)

Link copied to clipboard
@Serializable
data class DeviceSigned(val namespaces: ByteStringWrapper<DeviceNameSpaces>, val deviceAuth: DeviceAuth)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for mdoc request (8.3.2.1.2.1)

Link copied to clipboard
data class DeviceSignedItem(val key: String, val value: Any)

Convenience class (getting serialized in DeviceSignedItemListSerializer) to prevent usage of the type List<Map<String, Any>> in DeviceSignedItemList.entries.

Link copied to clipboard
data class DeviceSignedItemList(val entries: List<DeviceSignedItem>)

Convenience class with a custom serializer (DeviceSignedItemListSerializer) to prevent usage of the type Map<String, Map<String, Any>> in DeviceNameSpaces.entries.

Link copied to clipboard
open class DeviceSignedItemListSerializer(namespace: String) : KSerializer<DeviceSignedItemList>

Serializes DeviceSignedItemList.entries as an "inline map", having serialized instances of DeviceSignedItem as the values.

Link copied to clipboard
@Serializable
data class DocRequest(val itemsRequest: ByteStringWrapper<ItemsRequest>, val readerAuth: CoseSigned<ByteArray>? = null)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for mdoc request (8.3.2.1.2.1)

Link copied to clipboard
@Serializable
data class Document(val docType: String, val issuerSigned: IssuerSigned, val deviceSigned: DeviceSigned, val errors: Map<String, Map<String, Int>>? = null)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for mdoc request (8.3.2.1.2.1)

Link copied to clipboard
@Serializable
data class EncryptionInfo(val type: String, val encryptionParameters: EncryptionParameters)

Part of ISO 18013-7 Annex C

Link copied to clipboard
@Serializable
data class EncryptionParameters(val nonce: ByteArray, val recipientPublicKey: CoseKey)

Part of ISO 18013-7 Annex C

Link copied to clipboard
@Serializable
data class IssuerSigned

Part of the ISO/IEC 18013-5:2021 standard: Data structure for mdoc request (8.3.2.1.2.1)

Link copied to clipboard
data class IssuerSignedItem(val digestId: UInt, val random: ByteArray, val elementIdentifier: String, val elementValue: Any)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for mdoc request (8.3.2.1.2.1)

Link copied to clipboard
open class IssuerSignedItemSerializer(namespace: String, elementIdentifier: String) : KSerializer<IssuerSignedItem>
Link copied to clipboard
data class IssuerSignedList(val entries: List<ByteStringWrapper<IssuerSignedItem>>)

Convenience class with a custom serializer (IssuerSignedListSerializer) to prevent usage of the type Map<String, List<ByteStringWrapper<IssuerSignedItem>>> in IssuerSigned.namespaces.

Link copied to clipboard
open class IssuerSignedListSerializer(namespace: String) : KSerializer<IssuerSignedList>

Serializes IssuerSignedList.entries as an "inline list", having serialized instances of IssuerSignedItem as the values.

Link copied to clipboard
@Serializable
data class ItemsRequest(val docType: String, val namespaces: Map<String, ItemsRequestList>, val requestInfo: Map<String, String>? = null)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for mdoc request (8.3.2.1.2.1)

Link copied to clipboard
@Serializable(with = ItemsRequestListSerializer::class)
data class ItemsRequestList(val entries: List<SingleItemsRequest>)

Convenience class with a custom serializer (ItemsRequestListSerializer) to prevent usage of the type Map<String, Map<String, Boolean>> in ItemsRequest.namespaces.

Link copied to clipboard

Serializes ItemsRequestList.entries as an "inline map", having SingleItemsRequest.key as the map key and SingleItemsRequest.value as the map value, for the map represented by ItemsRequestList.

Link copied to clipboard
@Serializable
data class KeyAuthorization(val namespaces: Array<String>? = null, val dataElements: Map<String, Array<String>>? = null)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for MSO (9.1.2.4)

Link copied to clipboard
@Serializable
data class MobileSecurityObject(val version: String, val digestAlgorithm: String, val valueDigests: Map<String, ValueDigestList>, val deviceKeyInfo: DeviceKeyInfo, val docType: String, val validityInfo: ValidityInfo, val status: Status? = null)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for MSO (9.1.2.4)

Link copied to clipboard
@Serializable
data class ResponseUriToHash(val responseUri: String, val mdocGeneratedNonce: String)

Part of the ISO/IEC 18013-7:2024 standard: Session Transcript (B.4.4)

Link copied to clipboard
@Serializable
data class ServerItemsRequest(val docType: String, val namespaces: Map<String, Map<String, Boolean>>, val requestInfo: Map<String, String>? = null)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for Server retrieval mdoc request (8.3.2.2.2.1)

Link copied to clipboard
@Serializable
data class ServerRequest(val version: String, val token: String, val docRequests: Array<ServerItemsRequest>)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for Server retrieval mdoc request (8.3.2.2.2.1)

Link copied to clipboard
@Serializable
data class ServerResponse(val version: String, val documents: Array<String>, val documentErrors: Map<String, Int>? = null)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for Server retrieval mdoc response (8.3.2.2.2.2)

Link copied to clipboard
@Serializable
data class SessionTranscript

Part of the ISO/IEC 18013-5:2021 standard: Session transcript and cipher suite (9.1.5.1) and ISO/IEC 18013-7:2024 standard: Session Transcript (B.4.4) Must be used with encodeDefaults = false

Link copied to clipboard
data class SingleItemsRequest(val key: String, val value: Boolean)

Convenience class with a custom serializer (ItemsRequestListSerializer) to prevent usage of the type Map<String, Map<String, Boolean>> in ItemsRequest.namespaces.

Link copied to clipboard
@Serializable
data class ValidityInfo(val signed: Instant, val validFrom: Instant, val validUntil: Instant, val expectedUpdate: Instant? = null)

Part of the ISO/IEC 18013-5:2021 standard: Data structure for MSO (9.1.2.4)

Link copied to clipboard
data class ValueDigest(val key: UInt, val value: ByteArray)

Convenience class with a custom serializer (ValueDigestListSerializer) to prevent usage of the type Map<String, Map<UInt, ByteArray>> in MobileSecurityObject.valueDigests.

Link copied to clipboard
@Serializable(with = ValueDigestListSerializer::class)
data class ValueDigestList(val entries: List<ValueDigest>)

Convenience class with a custom serializer (ValueDigestListSerializer) to prevent usage of the type Map<String, Map<UInt, ByteArray>> in MobileSecurityObject.valueDigests.

Link copied to clipboard

Serialized the ValueDigestList.entries as an "inline map", meaning ValueDigest.key is the map key and ValueDigest.value the map value, for the map represented by ValueDigestList

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard