Socket
Socket
Sign inDemoInstall

node-verhoeff

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-verhoeff

Simple implementation of verhoeff checksum algorithm in NodeJS


Version published
Maintainers
1
Install size
5.16 kB
Created

Readme

Source

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

FAQs

Last updated on 26 Jan 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc