Created
November 14, 2024 07:57
-
-
Save ashutosh1211/a941bb0050e230f62cc2c263f4a3ddd2 to your computer and use it in GitHub Desktop.
AADHAR Biometric API wadh calulcation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CryptoJS = require("crypto-js");//replace thie with script tag in browser env | |
lr = 'Y'; | |
ra = "F"; //'F' for fingerprint | |
rc = 'Y'; | |
de = 'N'; | |
pfr = 'N'; | |
text = '2.5' + ra + rc + lr + de + pfr; | |
var sha = CryptoJS.SHA256(text); | |
var base64 = CryptoJS.enc.Base64.stringify(sha); | |
console.log('wadh:', base64); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment