AAMVA VIZ Barcode Comparison Verifier
Defined in library scandit_datacapture_id
- ComparisonCheckResult
Added in version 6.12.0
The result of a comparison done by AamvaVizBarcodeComparisonVerifier of a single piece of data from an AAMVA-compliant personal identification document.
- passed
Added in version 6.12.0
The compared data matches. In some instances the check may permit minor data divergence, to compensate, for example, for a single character misread by OCR.
- failed
Added in version 6.12.0
Some suspicious differences detected. This doesn’t automatically mean that the document is fraudulent, but such document should be inspected more carefully.
- skipped
Added in version 6.12.0
The data necessary to perform the check is missing and thus it is skipped.
- ComparisonCheck
abstract class ComparisonCheck<
T
>Added in version 6.12.0
A comparison done by AamvaVizBarcodeComparisonVerifier of a single piece of data from an AAMVA-compliant personal identification document.
- checkResult
ComparisonCheckResult get checkResult
Added in version 6.12.0
Whether any suspicious divergence in data is detected.
- resultDescription
String get resultDescription
Added in version 6.12.0
The human-readable result of the comparison.
- aamvaBarcodeValue
T
? get aamvaBarcodeValueAdded in version 6.12.0
The piece of data extracted from the barcode present at the back side of an AAMVA-compliant personal identification document.
- vizValue
T
? get vizValueAdded in version 6.12.0
The piece of data extracted from the human-readable front side of an AAMVA-compliant personal identification document.
- AamvaVizBarcodeComparisonResult
class AamvaVizBarcodeComparisonResult
Added in version 6.12.0
The result of an AAMVA-compliant personal identification document verification conducted by AamvaVizBarcodeComparisonVerifier.
- checksPassed
bool get checksPassed
Added in version 6.12.0
Whether all the checks conducted by the verifier passed. Only the check that were run count, so true is returned even if some of the checks were skipped.
- issuingCountryIsoMatch
ComparisonCheck<String> get issuingCountryIsoMatch
Added in version 6.12.0
Whether the issuing countries extracted from both sources of the data are the same.
- issuingJurisdictionIsoMatch
ComparisonCheck<String> get issuingJurisdictionIsoMatch
Added in version 6.12.0
Whether the issuing jurisdictions (for example: an issuing state, territory or federal district for USA, or an issuing province or territory for Canada) extracted from both sources of the data are the same.
- documentNumbersMatch
ComparisonCheck<String> get documentNumbersMatch
Added in version 6.12.0
Whether the document numbers extracted from both sources of the data match. This check may permit minor data divergence, to compensate, for example, for a single character misread by OCR.
- fullNamesMatch
ComparisonCheck<String> get fullNamesMatch
Added in version 6.12.0
Whether the holder’s full names extracted from both sources of the data match. This check may permit minor data divergence, to compensate, for example, for a single character misread by OCR.
- datesOfBirthMatch
ComparisonCheck<DateResult> get datesOfBirthMatch
Added in version 6.12.0
Whether the holder’s dates of birth extracted from both sources of the data are the same.
- datesOfExpiryMatch
ComparisonCheck<DateResult> get datesOfExpiryMatch
Added in version 6.12.0
Whether the document’s dates of expiry extracted from both sources of the data are the same.
- datesOfIssueMatch
ComparisonCheck<DateResult> get datesOfIssueMatch
Added in version 6.12.0
Whether the document’s dates of issue extracted from both sources of the data are the same.
- AamvaVizBarcodeComparisonVerifier
class AamvaVizBarcodeComparisonVerifier
Added in version 6.12.0
Validates the authenticity of the document by comparing the data from the VIZ and from the barcode on the back.
This verifier supports documents that follow the Driver License/Identification Card specification by the American Association of Motor Vehicle Administrators (AAMVA) and requires the front & back scanning mode.
Create the verifier and initialize IdCapture with the following settings:
DataCaptureContext dataCaptureContext = DataCaptureContext.forLicenseKey('-- ENTER YOUR SCANDIT LICENSE KEY HERE --'); AamvaVizBarcodeComparisonVerifier verifier = AamvaVizBarcodeComparisonVerifier.create() IdCaptureSettings settings = new IdCaptureSettings() settings.supportedDocuments = [IdDocumentType.dlViz] settings.supportedSides = SupportedSides.FrontAndBack IdCapture idCapture = IdCapture.forContext(dataCaptureContext, settings)
Then proceed to capture the front side & the back side of a document as usual. After you capture the back side and receive the combined result for both sides, you may run the verifier as follows:
@override void didCaptureId(IdCapture idCapture, IdCaptureSession session) { if (session.newlyCapturedId == null) { return; } idCapture.isEnabled = false; CapturedId capturedId = session.newlyCapturedId!; var vizResult = capturedId.viz; if (vizResult != null && vizResult.capturedSides == SupportedSides.frontAndBack) { AamvaVizBarcodeComparisonVerifier verifier = AamvaVizBarcodeComparisonVerifier.create(); verifier.verify(capturedId).then((result) => { if (result.checksPassed) { // Nothing suspicious was detected. } else { // You may inspect the results of individual checks, if you wish: if (result.datesOfBirthMatch.checkResult == ComparisonCheckResult.failed) { // The holder's date of birth from the front side does not match the one encoded in the barcode. } } }); } }
The return value allows you to query both the overall result of the verification and the results of individual checks. See AamvaVizBarcodeComparisonResult for details.
- AamvaVizBarcodeComparisonVerifier.create()
factory AamvaVizBarcodeComparisonVerifier.create()
Added in version 6.12.0
Creates a new instance of this verifier.
- verify(capturedId)
Future<AamvaVizBarcodeComparisonResult> verify( CapturedId capturedId)
Added in version 6.12.0
Compares the human-readable data from the front side of the document with the data encoded in the barcode, and signals any suspicious differences.