
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
hash-maker
Advanced tools
A collection of hash and number generators for Node or Browser in pure JS.
npm install hash-maker
Provides both CommonJS and ES modules.
SHA hash function. All SHA functions can be returned as a string, Uint8Array, Buffer or Hex string (default).
Can be imported as:
const { SHA256 } = require('hash-maker');
//
import { SHA256 } from 'hash-maker';
const hash = SHA256("0123456789",{asArray:true});
| Functions | Params |
|---|---|
| SHA1(message, options?) SHA224(message, options?) SHA256(message, options?) SHA384(message, options?) SHA512(message, options?) | Message to be hashed as string, Uint8Array or Buffer, options: { asString: true || asBuffer: true || asArray: true } |
MD5 hash function. MD5 functions can be returned as a string, Uint8Array, Buffer or Hex string (default).
Can be imported as:
const { MD5 } = require('hash-maker');
//
import { MD5 } from 'hash-maker';
const hash = MD5("0123456789",{asArray:true})
| Functions | Params |
|---|---|
| MD5(message, options?) | Message to be hashed as string, Uint8Array or Buffer, options: { asString: true || asBuffer: true || asArray: true } |
CRC hash function. CRC functions can be returned as a Hex string, Uint8Array, Buffer or number (default).
Can be imported as:
const { CRC32 } = require('hash-maker');
//
import { CRC32 } from 'hash-maker';
const hash = CRC32("0123456789",{asArray:true});
| Functions | Params |
|---|---|
| CRC3(message, options?) CRC16(message, options?) CRC32(message, options?) | Message to be hashed as string, Uint8Array or Buffer, options: { asBuffer: true || asArray: true || asHex: true } |
UUID generator function. UUID functions can create verisons 1 - 5 (default 4) and can be returned as a Uint8Array, Buffer or Hex string (default).
Can be imported as:
const { UUID } = require('hash-maker');
//
import { UUID } from 'hash-maker';
const id = UUID(1,{asArray:true});
| Functions | Params |
|---|---|
| UUID(verison, options?) | verison 1 - 5 (default 4), options: { seed: If seeding is needed. Must be UInt8Array or Buffer of 16 bytes, mac: If a mac ID is needed. Must be UInt8Array or Buffer of 6 bytes. Else one is generated when needed, asBuffer: true || asArray: true } |
Random byte generator function. Functions can be returned as a Buffer or Uint8Array (default). Numbers generated with the Mersenne Twister (see below).
Can be imported as:
const { randomBytes } = require('hash-maker');
//
import { randomBytes } from 'hash-maker';
const bytes = randomBytes(12,true);
| Functions | Params |
|---|---|
| randomBytes(amount, asBuffer?) | Bytes neede, true to return as a Buffer |
Mersenne Twister number generator class. Can be seeded with a number or Uint32Array.
Can be imported as:
const { MERSENNETWISTER } = require('hash-maker');
//
import { MERSENNETWISTER } from 'hash-maker';
const seed; // number or Uint32Array if needed
const mt = new MERSENNETWISTER(seed);
const unsignedInt = mt.genrand_int32() // or mt.RandTwisterUnsigned() mt.random_int()
const signedInt = mt.genrand_int32i() // or mt.RandTwisterSigned()
const unsigned31Int = mt.genrand_int3i() //31 bit number
const double = mt.genrand_real1() // or mt.RandTwisterDouble()
const float1 = mt.genrand_real2() // generates a random number on [0,1)-real-interval
const float2 = mt.genrand_real3() // generates a random number on (0,1)-real-interval
const float3 = mt.genrand_res53() // generates a random number on [0,1) with 53-bit resolution
| Functions | Params / returns |
|---|---|
| new MERSENNETWISTER(seed?) | Seed as number or Uint32Array |
| mt.genrand_int32() mt.RandTwisterUnsigned() mt.random_int() | unsigned 32 bit number |
| mt.genrand_int32i() mt.RandTwisterSigned() | signed 32 bit number |
| mt.genrand_real1() mt.RandTwisterDouble() | generates a random number on [0,1]-real-interval |
| mt.genrand_real2() | generates a random number on [0,1)-real-interval |
| mt.genrand_real3() | generates a random number on (0,1)-real-interval |
| mt.genrand_real3() | generates a random number on [0,1) with 53-bit resolution |
Random Xor Shift number generator class. Can seeded with a number or a Uint8Array or Buffer of 4 bytes.
Can be imported as:
const { RANDOMXORSHIFT } = require('hash-maker');
//
import { RANDOMXORSHIFT } from 'hash-maker';
const seed; //number, Uint8Array or Buffer of 4 bytes
const rxs = new RANDOMXORSHIFT(seed);
const random_int = rxs.random_int();
| Functions | Params / returns |
|---|---|
| new RANDOMXORSHIFT(seed?) | Seed as a number or a Uint8Array or Buffer of 4 bytes. |
| rxs.random_int() | unsigned 32 bit number |
FAQs
A collection of hash and number generators for Node or Browser
The npm package hash-maker receives a total of 9 weekly downloads. As such, hash-maker popularity was classified as not popular.
We found that hash-maker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.

Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.

Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.