parse

fun parse(bytes: ByteArray, referenceTime: Instant = Clock.System.now()): LdsParseResult<Dg1View>

Reads the bytes of EF.DG1. Fails with a ChipMalformedFile result, never an exception, when the file is not a DG1, the MRZ has a length no format uses, or the MRZ parser rejects it.

Parameters

bytes

the whole file.

referenceTime

the instant that picks the century of two-digit years and sets the date warnings, as for MrzParser.parse. Defaults to the current time.