🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

luhn-generator-crypto

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

luhn-generator-crypto

A modified version of the original luhn-generator (by rromanovsky) that uses cryptographic randomness (randomBytes) for secure randomness.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Cryptographic Luhn Generator

A generator of numbers (using cryptographic randomness function randomBytes) that passes the validation of Luhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10" algorithm

About

This package is a fork of luhn-generator.
It replaces Math.random() with crypto.randomBytes() for stronger randomness.

npm install luhn-generator-crypto --save

Usage

$ node
> import luhn from 'luhn-generator-crypto';
> luhn.generate(1, { pad: 12 }); // 000000000018

Keywords

luhn

FAQs

Package last updated on 28 Aug 2025

Did you know?

Socket

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