0.0.11 • Published 7 years ago

node-verhoeff v0.0.11

Weekly downloads
80
License
ISC
Repository
github
Last release
7 years ago

Verhoeff

Simple implementation of verhoeff checksum implentation in node JS.

Aadhaar numbers & verhoeff

Did you know aadhaar numbers have last digit as a verhoeff checksum. The idea behind this is to quickly identify typing/data-entry errors on the entry machine.

https://groups.google.com/forum/#!msg/aadhaarauth/eB5hOU-Qtq0/YDcWPdPOXowJ

Usage

npm i node-verhoeff --save
var verhoeff = require('node-verhoeff');

verhoeff.validateAadhaar('496858245152')
// should return true

verhoeff.generate([4, 9, 6, 8, 5, 8, 2, 4, 5, 1, 5]);
// should return 2, generates verhoeff checksum using the input array
Original code by

Sergey Petushkov, 2014

Understand the math

For more info on the algorithm: http://en.wikipedia.org/wiki/Verhoeff_algorithm by

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago