Package-level declarations

Types

Link copied to clipboard

The type of handover which occurred.

Link copied to clipboard

Base class for implementing NFC engagement according to ISO/IEC 18013-5:2021.

Link copied to clipboard
class MdocNfcCceEngagementHelper(val eDeviceKey: EcPublicKey, val onHandoverComplete: (connectionMethod: MdocConnectionMethod?, encodedDeviceEngagement: ByteString, handover: DataItem, eReaderKey: EcPublicKey) -> Unit, val onMessageReceived: suspend (ByteString) -> Unit, val onError: (error: Exception) -> Unit, val handoverPicker: suspend (connectionMethods: List<MdocConnectionMethod>) -> MdocConnectionMethod?? = null, val capabilities: Map<Capability, DataItem> = mapOf( Capability.READER_AUTH_ALL_SUPPORT to true.toDataItem(), Capability.EXTENDED_REQUEST_SUPPORT to true.toDataItem() ), val apduCommandMaxSize: Long = 65535, val apduResponseMaxSize: Long = 65536)

Helper used for NFC Concurrent Channel Engagement (CCE) on the mdoc side.

Link copied to clipboard

Base class for implementing NFC Concurrent Channel Engagement (CCE) according to ISO/IEC 18013-5 Second Edition.

Link copied to clipboard

Service for implementing NFC data transfer according to ISO/IEC 18013-5:2021.

Link copied to clipboard
class MdocNfcEngagementException(message: String, cause: Throwable? = null) : Exception

Exception thrown or reported when NFC engagement fails before handover completes.

Link copied to clipboard
class MdocNfcEngagementHelper(val eDeviceKey: EcPublicKey, val onHandoverComplete: (connectionMethods: List<MdocConnectionMethod>, encodedDeviceEngagement: ByteString, handover: DataItem) -> Unit, val onError: (error: Exception) -> Unit, val staticHandoverMethods: List<MdocConnectionMethod>? = null, val negotiatedHandoverPicker: suspend (connectionMethods: List<MdocConnectionMethod>) -> MdocConnectionMethod? = null, val capabilities: Map<Capability, DataItem> = mapOf( Capability.READER_AUTH_ALL_SUPPORT to true.toDataItem(), Capability.EXTENDED_REQUEST_SUPPORT to true.toDataItem() ))

Helper used for NFC engagement on the mdoc side.

Link copied to clipboard

Base class for NFC APDU services that initiate and manage an ISO/IEC 18013-5 mdoc presentment transaction (MdocNdefService and MdocNfcCceService).

Link copied to clipboard

Specifies which NFC engagement technologies an mdoc reader should attempt during handover.

Link copied to clipboard
data class MdocReaderNfcHandoverOptions(val engagementType: MdocReaderNfcEngagementType = MdocReaderNfcEngagementType.NFC_CCE_AND_NFC_CONNECTION_HANDOVER, val cceEReaderKeyCurve: EcCurve = EcCurve.P256, val cceEReaderKey: EcPrivateKey? = null, val readerEngagement: ReaderEngagement? = null, val random: Random = Crypto.secureRandom)

Options for when performing handover as a mdoc reader.

Link copied to clipboard
data class MdocReaderNfcHandoverResult(val connectionMethods: List<MdocConnectionMethod>, val encodedDeviceEngagement: ByteString, val handover: DataItem, val type: MdocHandoverType, val eReaderKey: EcPrivateKey? = null, val apduCommandMaxSize: Int = 65535, val apduResponseMaxSize: Int = 65536)

The result of a successful NFC handover operation.

Link copied to clipboard
data class ScanMdocReaderResult(val transport: MdocTransport, val encodedDeviceEngagement: ByteString, val handover: DataItem, val type: MdocHandoverType, val processingDuration: Duration, val eReaderKey: EcPrivateKey? = null)

Result from scanMdocReader.

Functions

Link copied to clipboard
suspend fun mdocReaderNfcHandover(tag: NfcIsoTag, negotiatedHandoverConnectionMethods: List<MdocConnectionMethod>, options: MdocReaderNfcHandoverOptions = MdocReaderNfcHandoverOptions()): MdocReaderNfcHandoverResult?

Perform NFC Engagement as a mdoc reader.

Link copied to clipboard
suspend fun NfcTagReader.scanMdocReader(message: String?, options: MdocTransportOptions, handoverOptions: MdocReaderNfcHandoverOptions = MdocReaderNfcHandoverOptions(), transportFactory: MdocTransportFactory = MdocTransportFactory.Default, selectConnectionMethod: suspend (connectionMethods: List<MdocConnectionMethod>) -> MdocConnectionMethod?, negotiatedHandoverConnectionMethods: List<MdocConnectionMethod>, nfcScanOptions: NfcScanOptions = NfcScanOptions(), context: CoroutineContext = Dispatchers.Default): ScanMdocReaderResult?

Performs NFC engagement as a mdoc reader.

suspend fun <T> NfcTagReader.scanMdocReader(message: String?, options: MdocTransportOptions, handoverOptions: MdocReaderNfcHandoverOptions = MdocReaderNfcHandoverOptions(), transportFactory: MdocTransportFactory = MdocTransportFactory.Default, selectConnectionMethod: suspend (connectionMethods: List<MdocConnectionMethod>) -> MdocConnectionMethod?, negotiatedHandoverConnectionMethods: List<MdocConnectionMethod>, nfcScanOptions: NfcScanOptions = NfcScanOptions(), context: CoroutineContext = Dispatchers.Default, onHandover: suspend (scanResult: ScanMdocReaderResult) -> T?): T?

Performs NFC engagement and reader transaction processing as a mdoc reader.