fayda_decoder 0.1.0
fayda_decoder: ^0.1.0 copied to clipboard
Offline decoder and signature verifier for the QR code on the Ethiopian Fayda national ID card. Community port; not affiliated with NIDP.
0.1.0 #
First release.
Decoding #
decodePayloadparses Fayda V4 QR text into a sealedFaydaResultwith typed fields; one malformed field becomesnullinstead of failing the parse. Passes the shared upstream test vectors.isFaydaPayloadcheaply filters barcode-scanner callbacks.decodeImageanddecodeImageDatadecode photos with a grayscale and upscale retry pipeline;decodeImageInBackgroundanddecodeImageDataInBackgroundrun it on an isolate (inline on the web).RgbaImage.fromLuminanceandRgbaImage.fromBgraacceptcamerapackage frames from Android and iOS.- Pluggable
QrScanner; the defaultZxingQrScanneris pure Dart and repairs zxing2's handling of non-ASCII (Ethiopic) text.
Verification #
verifySignatureandFaydaSuccess.verify()check the detached RS256 JWS against the bundled NIDP V4 key or a key you supply.
Developer experience #
- Value equality and
toJson/FaydaResult.fromJsonround-trips. FaydaFields.formattedFan,ageandageAt.- Redacted
toString()and payload-free error messages. package:fayda_decoder/testing.dart:buildTestPayload,buildTestQrPng,buildTestQrImageandfaydaTestPublicKeyPemfor tests without real cards.fayda_decodercommand-line tool.- Flutter example app with camera, gallery and sample-card flows.
