ChipMalformedFile

data class ChipMalformedFile(val fileId: Int?, val reason: ChipMalformedFile.Reason, val offset: Int? = null) : ChipError

Content error: a file read from the chip is not built the way ICAO Doc 9303 Part 10 describes, so it cannot be turned into a typed view.

This is the one error for every malformed chip file: the text data groups, the image data groups (DG2, DG5, DG7), the security object (EF.SOD) and a file whose bytes end before the length its header declares. The bytes the chip sent are still available to your app when they were read; only the view could not be made. The description names the problem, never a value from the file.

Experimental: see ExperimentalTesseraChipApi.

Since

1.0.0

Constructors

Link copied to clipboard
constructor(fileId: Int?, reason: ChipMalformedFile.Reason, offset: Int? = null)

Types

Link copied to clipboard

What is wrong with a file.

Properties

Link copied to clipboard
open override val code: String

A stable name of this error: see ChipError.code.

Link copied to clipboard
open override val description: String

English text for logs: the reason, the file identifier and the offset when known.

Link copied to clipboard
val fileId: Int?

The two-byte file identifier of the file (for example 0x0101 for EF.DG1), or null when it is not known.

Link copied to clipboard
val offset: Int?

Where in the file's bytes the fault was found, or null when it is not a single place or not known.

Link copied to clipboard

What is wrong with the file.

Link copied to clipboard
open val statusWord: Int?

The status word the chip answered with, when this error carries one (for example 0x6300 for a refused key), otherwise null. The same value as the statusWord of the subtypes that have one, so an app reads it without a cast.

Functions

Link copied to clipboard
open override fun toString(): String

ChipMalformedFile: followed by description.