Git Product home page Git Product logo

aadhaar-validator's People

Contributors

dinsaw avatar srikanthlogic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aadhaar-validator's Issues

Validator is not working for 16 digits 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](https://www.uidai.gov.in/images/authDoc/uidai_12_06_18_cer.cer).

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 Offline QR validator

Utility functions for performing validation functions to validate Offline QR.

Reference - Archive

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.