Package-level declarations

Types

Link copied to clipboard
data class CommonFields(val documentType: DocumentType, val issuingState: CountryCode, val primaryIdentifier: String, val secondaryIdentifier: String, val nameTruncated: Boolean, val rawNameField: String, val documentNumber: String, val nationality: CountryCode, val dateOfBirth: MrzDate, val sex: Sex, val rawSex: Char, val dateOfExpiry: MrzDate, val checkDigits: MrzCheckDigits)

The MRZ fields that every format carries.

Link copied to clipboard
data class MrvA(val rawLines: List<String>, val commonFields: CommonFields, val optionalData: String) : MrzDocument

A parsed MRV-A (Type-A visa) MRZ: two lines of 44 characters.

Link copied to clipboard
data class MrvB(val rawLines: List<String>, val commonFields: CommonFields, val optionalData: String) : MrzDocument

A parsed MRV-B (Type-B visa) MRZ: two lines of 36 characters.

Link copied to clipboard
data class MrzCheckDigits(val documentNumber: Char, val dateOfBirth: Char, val dateOfExpiry: Char, val optionalData: Char?, val composite: Char?)

The check digits exactly as printed on the document, not computed by the SDK.

Link copied to clipboard
data class MrzDate(val rawYear: String, val rawMonth: String, val rawDay: String, val computedYear: Int? = null, val computedDate: LocalDate? = null, val inferenceMethod: MrzDateInferenceMethod = MrzDateInferenceMethod.RAW_ONLY, val componentsFormCalendarDate: Boolean? = null)

An MRZ date: the printed year, month, and day, plus an inferred full date.

Link copied to clipboard

How MrzDate chose the century of a date, or that it did not.

Link copied to clipboard
sealed class MrzDocument

A parsed MRZ document: TD1, TD2, TD3, MrvA, or MrvB.

Link copied to clipboard
data class TD1(val rawLines: List<String>, val commonFields: CommonFields, val optionalData1: String, val optionalData2: String) : MrzDocument

A parsed TD1 (identity card) MRZ: three lines of 30 characters.

Link copied to clipboard
data class TD2(val rawLines: List<String>, val commonFields: CommonFields, val optionalData: String) : MrzDocument

A parsed TD2 (smaller identity document) MRZ: two lines of 36 characters.

Link copied to clipboard
data class TD3(val rawLines: List<String>, val commonFields: CommonFields, val personalNumber: String, val personalNumberCheckDigit: Char) : MrzDocument

A parsed TD3 (passport) MRZ: two lines of 44 characters.