CeiReader

class CeiReader

Builder for a KYC read session against a Romanian CEI card.

Obtain an instance from EidKit.reader. Configure the desired operations using the builder methods, then call read with the IsoDep tag received from ro.eidkit.sdk.nfc.NfcManager.

Passive authentication always runsReadResult.passiveAuth is always populated. Photo and signature image are opt-in because they are slow (~7s and ~1.5s respectively).

Example

override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
val isoDep = nfcManager.handleIntent(intent) ?: return
lifecycleScope.launch {
val result = EidKit.reader()
.withPhoto(true)
.withPersonalData(pin = userEnteredPin)
.withActiveAuth(true)
.read(isoDep)
// result.passiveAuth is always set
// result.identity is set because withPersonalData was called
// result.claim is set when passiveAuth is Valid and identity is present
}
}

Functions

Link copied to clipboard
suspend fun read(isoDep: IsoDep): ReadResult

Execute the read session on the given IsoDep tag.

Link copied to clipboard
fun readFlow(isoDep: IsoDep): Flow<ReadEvent>

Execute the read session and emit ReadEvent progress events as the session advances.

Link copied to clipboard
fun withActiveAuth(enabled: Boolean = true): CeiReader

Request active authentication — verifies the chip is genuine and has not been cloned. Requires withPersonalData to also be called (shares the same PACE session).

Link copied to clipboard

Request personal data from the EDATA applet (name, CNP, address, document info). Requires the card holder's 4-digit auth PIN.

Link copied to clipboard
fun withPhoto(enabled: Boolean = true): CeiReader

Request the face photo (DG2, ~24KB JPEG). Adds approximately 7 seconds to the session. Disabled by default.

Link copied to clipboard
fun withSignatureImage(enabled: Boolean = true): CeiReader

Request the handwritten signature image (DG7, ~2.6KB JPEG). Adds approximately 1.5 seconds to the session. Disabled by default.