sadl_parsing 0.0.2 copy "sadl_parsing: ^0.0.2" to clipboard
sadl_parsing: ^0.0.2 copied to clipboard

Decrypt and parse the South African Driver's license raw data

Features #

  • Decrypt and parse the contents of the South African Driver's license.
  • Receive all data back in a Driver's License Class

Getting started #

You will need a way to scan the license itself. This package simply decrypts and parses the raw binary data.

Usage #

Firstly, create a Uint8List from the raw data you got from scanning the PDF417 barcode. You can then call the tool to parse and decrypt the data.

All data is kept in a class called DriversLicense.

DrivingLicense? drivingLicense;

try {

    final String iso = call.arguments;
    Uint8List data = Uint8List.fromList(iso.codeUnits);


    final licenseInfoDecrypted = const SadlTool().decryptData(data);
    final licenseInfo = const SadlTool().parseData(licenseInfoDecrypted); 
    drivingLicense = licenseInfo;       
    print(drivingLicense.birthdate);

      } catch (e) {
        print('parsing or decryption failed');
        }

Additional information #

Feel free to submit pull requests. Photo is not working, that is the last thing I need to figure out how to get working.

1
likes
120
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

Decrypt and parse the South African Driver's license raw data

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, pointycastle

More

Packages that depend on sadl_parsing