MrzResult

data class MrzResult(    val rawMRZString: String,     val documentCode: String,     val issuer: String,     val documentNumber: String,     val opt1: String,     val opt2: String,     val gender: String,     val nationality: String,     val primaryID: String,     val secondaryID: String,     val issuerName: String,     val nationalityName: String,     val verified: Boolean = false,     val dateOfBirth: DateResult<String>,     val dateOfExpiry: DateResult<String>,     val documentType: DocumentType,     val sanitizedOpt1: String,     val sanitizedOpt2: String,     val sanitizedNationality: String,     val sanitizedIssuer: String,     val sanitizedDocumentCode: String,     val sanitizedDocumentNumber: String)

Represents the result of the MRZ recognition.

Constructors

Link copied to clipboard
constructor(    rawMRZString: String,     documentCode: String,     issuer: String,     documentNumber: String,     opt1: String,     opt2: String,     gender: String,     nationality: String,     primaryID: String,     secondaryID: String,     issuerName: String,     nationalityName: String,     verified: Boolean = false,     dateOfBirth: DateResult<String>,     dateOfExpiry: DateResult<String>,     documentType: DocumentType,     sanitizedOpt1: String,     sanitizedOpt2: String,     sanitizedNationality: String,     sanitizedIssuer: String,     sanitizedDocumentCode: String,     sanitizedDocumentNumber: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The date of birth of the document holder.

Link copied to clipboard

The date of expiry of the document.

Link copied to clipboard

The document code. Document code contains two characters. For MRTD the first character shall be A, C or I. The second character shall be discretion of the issuing State or organization except that V shall not be used, and C shall not be used after A except in the crew member certificate. On machine-readable passports (MRP) first character shall be P to designate an MRP. One additional letter may be used, at the discretion of the issuing State or organization, to designate a particular MRP. If the second character position is not used for this purpose, it shall be filled by the filter character <

Link copied to clipboard

The document number

Link copied to clipboard

The type of the document.

Link copied to clipboard

The gender of the document holder. Gender is specified by use of the single initial, capital letter F for female, M for male or < for unspecified.

Link copied to clipboard

Tthree-letter or two-letter code which indicate the issuing State. Three-letter codes are based on Aplha-3 codes for entities specified in ISO 3166-1, with extensions for certain States. Two-letter codes are based on Aplha-2 codes for entities specified in ISO 3166-1, with extensions for certain States.

Link copied to clipboard

The full issuer name that is expanded from the three-letter or two-letter code which indicate the issuing State.

Link copied to clipboard

The nationality of the document holder represented by a three-letter or two-letter code. Three-letter codes are based on Alpha-3 codes for entities specified in ISO 3166-1, with extensions for certain States. Two-letter codes are based on Aplha-2 codes for entities specified in ISO 3166-1, with extensions for certain States.

Link copied to clipboard

The full nationality of the document holder, which is expanded from the three-letter or two-letter nationality code.

Link copied to clipboard

The first optional data. Empty string if not available.

Link copied to clipboard

The second optional data. Empty string if not available.

Link copied to clipboard

the primary indentifier. If there is more than one component, they are separated with space.

Link copied to clipboard

The entire Machine Readable Zone text from ID.

Link copied to clipboard

The sanitized document code. Result without additional '<' characters if they exist.

Link copied to clipboard

The sanitized document number. Result without additional '<' characters if they exist.

Link copied to clipboard

The sanitized issuer. Result without additional '<' characters if they exist.

Link copied to clipboard

The sanitized nationality. Result without additional '<' characters if they exist.

Link copied to clipboard

The sanitized first optional data. Result without additional '<' characters if they exist.

Link copied to clipboard

The sanitized second optional data. Result without additional '<' characters if they exist.

Link copied to clipboard

The secondary identifier. If there is more than one component, they are separated with space.

Link copied to clipboard
val verified: Boolean = false

Whether the MRZ is verified. If the MRZ is verified, it means that all check digits are correct.