dinsaw / aadhaar-validator Goto Github PK
View Code? Open in Web Editor NEWValidates Aadhaar Number, Aadhaar VID
Validates Aadhaar Number, Aadhaar VID
First of all, thanks for this library.
I have been facing an issue while using the same library for validating Aadhaar virtual ID (VID).
When I am going through the codebase, found that we are making any number greater than 12 as invalid aadhaar number.
Can you make changes to work for both Aadhaar-number and VID.
Hi I am trying to validate signature in the secure QR code but I am getting false value. I used the above certificates and uidai_12_06_18_cer.cer.
code of getting signature value__
for(int i=0,j = output.length-1; i<256 & j >= output.length-256 ; i++,j--){
signArray[i] = output[j];
}
END__
signature verification method
Signature signature = Signature.getInstance("SHA256withRSA");
InputStream in = getAssets().open("uidai.cer");
CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
X509Certificate cer = (X509Certificate) certFactory.generateCertificate(in);
PublicKey publicKey = cer.getPublicKey();
in.close();
signature.initVerify(publicKey);
signature.update(dataSigned);
isVerified = signature.verify(signArray);
END__
I followed same validation steps given in the UIDAI pdf https://uidai.gov.in/images/resource/User_manulal_QR_Code_15032019.pdf.
can any help me to figure out the mistake I am making.
Thanks in advance.
Originally posted by @UgandharTalari in #6 (comment)
Add license, note on commercial use (link to SC judgement, amendments), disclaimer, specifically on warranties of any kind in using the code
Utility functions for performing validation functions to validate Offline QR.
Download certificates for signature validation from UIDAI downloads page
Sample Unit Test Data for the given QR string in the reference
Content Length is : 1100
Data bytes is :185
Mobile Email Flag is 2
RefId is 890820190305150137123
Last 4 Digit of Aadhaar is 8908
Name is PENUMARTHI VENKAT
DOB is 07-05-1987
Gender is M
Address Care of is S/O: PATTABHI RAMA RAO
Address District is EAST GODAVARI
Address House is 4-83
Address location is SCTOR-2
Address PINCode is 533016
Address Post Office is ARATLAKATTA
Address State is ANDHRA PRADESH
Address Street is MAIN ROAD
Address SubDistrict is KARAPA
Address VTC is ARATLAKATTA
Data End is 184
Email Hash is null
Mobile Hash is 1F31F19AFC2BACBD8AFB84526AE4DA184A2727E8C2B1B6B9A81E4DC6B74D692A
Photo Exists : true
Signature Verify Data call is false
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.