ChipAccessKey
What opens a document's chip: values from its MRZ, or its card access number (CAN).
The chip only answers a reader that proves it has seen the document. Both kinds of key are read from the document itself, by the camera or typed in by a person.
The key holds its values as bytes, which clear overwrites with zeros once the read is done. Its toString() never shows them. Two keys are equal only when they are the same object.
Who clears it. A key is for one person's action: one read, then it is cleared. The high-level entry points (NfcChipRead, CoreNfcChipRead) take the key in the options over from the start and clear it at the ending of the read, whatever the ending is; a restart after a lost link still has it until then. When you call ChipReader.read yourself, you own the key and clear it. Never use one key for a second read: make a new one, so each attempt at the chip is a new action of the person.
To make an MRZ key from a scanned or parsed MRZ, use Mrz.from; from values a person typed, Mrz.fromTypedFields (with Mrz.normalizeTypedFields before it, if your form should accept lower-case letters and spaces around a value); from a card access number, Can.from. Every builder answers with a result, so bad input is shown to the person, not thrown.
Experimental: see ExperimentalTesseraChipApi.
Since
1.0.0
Inheritors
Types
A key from the card access number (CAN): the short number printed on the document for chip access, often six digits. Use it when the document has one and the MRZ is not at hand, or when a chip asks for it.