Package-level declarations

Types

Link copied to clipboard
data class ChipAccessDenied(val protocol: ChipAccessProtocol, val reason: ChipAccessDenied.Reason, val statusWord: Int? = null) : ChipError

Protocol error: the chip did not grant access, or did not let the reader read a file.

Link copied to clipboard

Content error: the chip answers but holds no eMRTD application.

Link copied to clipboard

Root of the errors that stop reading a document's chip.

Link copied to clipboard
data class ChipFileNotFound(val fileId: Int, val listedByChip: Boolean) : ChipError

Content error: a file the reader asked for is not on the chip (status 6A82), or the chip's own lists (EF.COM, EF.SOD) do not name it, so it was not asked for.

Link copied to clipboard

Input error: in the MRZ access key, the check digit of one or more fields does not match its field, so the reader sent nothing to the chip.

Link copied to clipboard
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.

Link copied to clipboard

Protocol error: the secure-messaging session with the chip ended, so no further command can be sent in it (ICAO Doc 9303 Part 11, section 9.8).

Link copied to clipboard

Protocol error: the chip answered in a way the reader cannot use: a status word no step expects, an answer with no status word, or a file answer that cannot be put together.

Link copied to clipboard

Protocol error: the chip and the reader have no algorithm in common for the access protocol, so the chip cannot be opened.

Link copied to clipboard
data class MrzCharacterSetViolation(val offendingCharacter: Char, val position: Int) : MrzParseError

Parse error: the input has a character outside A-Z, 0-9, and <.

Link copied to clipboard
data class MrzCheckDigitMismatch(val field: MrzField, val expected: Char, val observed: Char, val position: Int) : MrzValidationError

Validation failure: a printed check digit differs from the one the SDK computes.

Link copied to clipboard
data class MrzDateNotInCalendar(val field: MrzField, val rawYear: String, val rawMonth: String, val rawDay: String, val position: Int) : MrzValidationError

Validation failure: a date's numeric parts form no real calendar date, for example month 13.

Link copied to clipboard
sealed class MrzError

Root of the errors that stop an operation: MrzParseError and MrzGenerationError.

data class MrzExpiryDateAfterNonHarmonizedPassportLimit(val rawDocumentCode: String, val expiryDate: LocalDate) : MrzWarning

Warning: a passport whose document code has no harmonized second letter expires on or after 1 January 2038.

Link copied to clipboard
data class MrzExpiryDateCenturyNotInferred(val rawYear: String, val rawMonth: String, val rawDay: String, val referenceDate: LocalDate) : MrzWarning

Warning: the SDK could not place the expiry year in a century.

Link copied to clipboard
data class MrzExpiryDateImplausiblyFar(val expiryDate: LocalDate, val referenceDate: LocalDate, val thresholdYears: Int) : MrzWarning

Warning: the expiry date is more than thresholdYears after referenceDate.

Link copied to clipboard
data class MrzExpiryDatePast(val expiryDate: LocalDate, val referenceDate: LocalDate) : MrzWarning

Warning: the expiry date is earlier than referenceDate.

Link copied to clipboard
data class MrzFormatNotDetected(val observedLineCount: Int, val observedLineLengths: List<Int>) : MrzParseError

Parse error: the line count and line lengths fit no supported format.

Link copied to clipboard

Root of the errors that stop MrzGenerator from building an MRZ.

Link copied to clipboard
data class MrzGenerationFieldOverflow(val format: MrzFormat, val field: MrzField, val maxLength: Int, val observedLength: Int, val observedValue: String) : MrzGenerationError

Generation error: a value is longer than its field allows in the format.

Link copied to clipboard
data class MrzGenerationFieldTooShort(val format: MrzFormat, val field: MrzField, val expectedLength: Int, val observedLength: Int, val observedValue: String) : MrzGenerationError

Generation error: a value is shorter than its fixed-width field needs in the format.

Link copied to clipboard
data class MrzGenerationInvalidSexValue(val format: MrzFormat, val observed: Char) : MrzGenerationError

Generation error: a document's sex character is not M, F, or <.

Link copied to clipboard
data class MrzGenerationNumericInNameField(val format: MrzFormat, val observedValue: String, val numericCharacters: List<Char>) : MrzGenerationError

Generation error: a primary or secondary identifier contains a digit.

Link copied to clipboard
data class MrzGenerationUnsupportedCharacters(val format: MrzFormat, val field: MrzField, val unmappedCharacters: List<UnmappedCharacter>, val observedValue: String) : MrzGenerationError

Generation error: a value has characters outside A-Z, 0-9, and < that no profile mapped.

Link copied to clipboard
data class MrzInvalidLength(val format: MrzFormat, val expectedLineCount: Int, val expectedLineLength: Int, val observedLineCount: Int, val observedLineLengths: List<Int>) : MrzParseError

Parse error: the line count or a line length does not fit the format you named.

Link copied to clipboard
data class MrzInvalidSexValue(val observed: Char, val position: Int) : MrzValidationError

Validation failure: the sex character is not M, F, <, or X.

Link copied to clipboard
data class MrzNameTruncated(val rawNameField: String, val position: Int) : MrzWarning

Warning: the name field fills its width with no trailing <.

Link copied to clipboard
sealed class MrzParseError : MrzError

Root of the errors that stop MrzParser from building a document.

Link copied to clipboard
data class MrzPersonalNumberCheckDigitFiller(val rawPersonalNumber: String, val position: Int) : MrzWarning

Warning: a TD3 personal number has content, but its check digit is <.

Link copied to clipboard
data class MrzSexCharacterX(val observed: Char, val position: Int) : MrzWarning

Warning: the sex character is X.

Link copied to clipboard
data class MrzUnknownCountryCode(val field: MrzField, val rawCode: String, val position: Int) : MrzWarning

Warning: an issuing state or nationality code is not in the SDK's country code table.

Link copied to clipboard
data class MrzUnknownDocumentTypeCode(val rawCode: String, val position: Int) : MrzWarning

Warning: the document type code is not in the SDK's document type table.

Link copied to clipboard
sealed class MrzValidationError

Root of the validation failures: the text was read, but a check did not pass.

Link copied to clipboard
sealed class MrzWarning

Root of the warnings: the data is readable, but something is unusual.

Link copied to clipboard

Root of the errors of the connection to a chip: the platform's NFC link, not the chip protocol.

Link copied to clipboard

Connection error: a chip read ended while the chip had not answered: no try of the read got past the first commands, the ones before the key is used.

Link copied to clipboard

Connection error: the chip left the reader's field, or the link to it broke, before it answered.

Link copied to clipboard
data class NfcTimeout(val timeoutMillis: Long?, val limit: NfcTimeout.Limit) : NfcError

Connection error: a time limit passed. limit says which one, as a fact: the limit on one command, the app's own wait for a document, or the system's limit on one NFC session.

Link copied to clipboard

Connection error: NFC cannot be used on this device right now, so no chip can be reached.