South African Identification documents have barcodes which provide specific data about their owners. This project provides a Dart Library for decoding and working with the details from these barcodes. Supported documents include:
This package can only be used by other dart projects. If this is your first dart project, see the following pages to help you get started:
Add rsa_identification
as a dependency in your pubspec.yaml file.
A simple usage example:
import 'dart:convert';
import 'package:rsa_identification/rsa_identification.dart';
void main() {
final idCardBarcode =
'SURNAME|NAME|GENDER|NATIONALITY|ID NUMBER|29 Jul 2000|COUNTRY OF BIRTH|CITIZENSHIP STATUS|26 Jan 2017|23370|SMART ID NUMBER|1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890';
final idCard = IdCard.fromBarcodeString(idCardBarcode);
print('ID Card - First Names: ${idCard.firstNames}');
print('ID Card - Last Name: ${idCard.surname}');
print('ID Card - ID Number: ${idCard.idNumber}');
final idBookBarcode = '7310095800088';
final idBook = IdBook.fromIdNumber(idBookBarcode);
print('ID Book - Date of Birth: ${idBook.birthDate}');
print('ID Book - Gender: ${idBook.gender}');
print('ID Book - Citizenship: ${idBook.citizenshipStatus}');
}
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE for more information.
BornIdeas - born.dev - info@born.dev
Project Link: https://github.com/born-ideas/rsa_identification