Companion

object Companion

Functions

Link copied to clipboard
fun decodeDeviceRetrievalMethods(items: List<DataItem>, senderRole: MdocRole = MdocRole.MDOC): List<MdocConnectionMethod>

Decodes a list of DeviceRetrievalMethod CBOR DataItem elements into single-mode MdocConnectionMethod instances.

Link copied to clipboard
fun decodeNdefHandoverCarrier(record: NdefRecord, senderRole: MdocRole, fallbackUuid: UUID?, auxiliaryRecords: List<NdefRecord> = emptyList()): List<MdocConnectionMethod>

Decodes an NFC Connection Handover carrier configuration NdefRecord into zero or more single-mode MdocConnectionMethod instances.

Link copied to clipboard
fun encodeDeviceRetrievalMethods(methods: List<MdocConnectionMethod>, engagementType: MdocEngagementType = MdocEngagementType.DEVICE_QR): List<DataItem>

Encodes a list of single-mode MdocConnectionMethod entries into DeviceRetrievalMethods CBOR items, coalescing all Ble entries into a single [2, 1, BleOptions] item at the position of the first Ble entry (satisfying ISO/IEC 18013-5 clause 9.2's uniqueness rule for (type, version) tuples).

Link copied to clipboard
fun encodeNdefHandoverCarriers(methods: List<MdocConnectionMethod>, handoverType: MdocNfcHandoverType, sharedAuxiliaryReferences: List<String> = emptyList(), hrHadChBleOptions: Boolean = false): List<HandoverCarrierRecords>

Encodes a list of single-mode MdocConnectionMethod entries into NFC Forum Connection Handover HandoverCarrierRecords bundles, coalescing all Ble entries into a single BLE OOB ("0") + optional ChBleOptions ("chble") carrier at the position of the first Ble entry.

Link copied to clipboard
fun fromDeviceEngagement(encodedDeviceRetrievalMethod: ByteArray, senderRole: MdocRole = MdocRole.MDOC): List<MdocConnectionMethod>

Decodes a single DeviceRetrievalMethod CBOR byte array into one or more single-mode MdocConnectionMethod instances (or an empty list if the method type/version is unsupported).