ApduTransport

Sends command bytes to a chip and returns its answer: the one seam between the shared chip code and a platform's NFC reader.

A platform module implements it over its NFC API (Android IsoDep, iOS NFCISO7816Tag), and an app can implement it over any other reader, such as a USB card reader on a desktop. Only bytes cross it: the SDK builds every command, including secure messaging, and reads every answer.

An implementation must not change, log, or keep the bytes it carries: they hold document data.

Experimental: see ExperimentalTesseraChipApi.

Since

1.0.0

Properties

Link copied to clipboard
abstract val maxCommandLength: Int

The longest command, in bytes, that the transport can send in one exchange: the whole command APDU, header included.

Link copied to clipboard

Which file the chip has selected when the read starts, when the platform knows it.

Link copied to clipboard

Whether the transport can carry extended-length APDUs (up to 65,535 data bytes in a command and 65,536 in an answer).

Functions

Link copied to clipboard
abstract suspend fun transceive(command: ByteArray): ByteArray

Sends one command APDU and returns the chip's whole answer, status word included.