Can
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.
The valid form. Digits 0 to 9 only, at least one, exactly as printed on the document, with no spaces or other characters. ICAO Doc 9303 Part 11 lists the CAN among the passwords of PACE and has it printed or displayed on the document; the SDK uses its digits as ASCII characters for the PACE key. The SDK sets no upper limit on the length, because it cannot know how long a number each issuer prints. A CAN has no check digit, so a mistyped CAN is not noticed before the read: it costs the chip a try, as a wrong MRZ value does.
The constructor throws for a value that is not usable; from gives the same answer as a result, the same way the MRZ key builders do, so one piece of code can handle both kinds of key.
Since
1.0.0
Parameters
The card access number as printed: digits only, at least one.
Throws
when can is empty or holds a character other than 0 to 9. The message never contains the value.