Pure JavaScript ES modules version of @noble/hashes - Audited & minimal 0-dependency JS implementation of SHA, RIPEMD, BLAKE, HMAC, HKDF, PBKDF & Scrypt
npm install simple-noble-hashesPure JavaScript ES modules version of @noble/hashes - Audited & minimal 0-dependency JS implementation of SHA, RIPEMD, BLAKE, HMAC, HKDF, PBKDF & Scrypt.
This is a pre-compiled version of the noble-hashes library that:
- ✅ Works directly with npm-based CDNs (unpkg, jsDelivr, esm.sh, etc.)
- ✅ Pure JavaScript with ES modules
- ✅ Includes TypeScript definitions (.d.ts files)
- ✅ No build step required
- ✅ Same API as the original @noble/hashes
``bash`
npm install simple-noble-hashes
Or use directly from CDN:
`js`
import { sha256 } from 'https://unpkg.com/simple-noble-hashes/sha2.js';
import { blake3 } from 'https://unpkg.com/simple-noble-hashes/blake3.js';
The API is identical to @noble/hashes. Please refer to the original documentation for detailed usage instructions.
Quick example:
`js
import { sha256 } from 'simple-noble-hashes/sha2';
import { blake3 } from 'simple-noble-hashes/blake3';
import { hmac } from 'simple-noble-hashes/hmac';
import { pbkdf2 } from 'simple-noble-hashes/pbkdf2';
// SHA-256 hash
const hash = sha256('hello world');
// BLAKE3 hash
const blake3Hash = blake3('hello world');
// HMAC-SHA256
const mac = hmac(sha256, 'key', 'message');
// PBKDF2
const derived = await pbkdf2(sha256, 'password', 'salt', { c: 100000, dkLen: 32 });
`
All algorithms from the original library are available:
- SHA: sha1, sha256, sha384, sha512, sha224, sha512_224, sha512_256sha3_224
- SHA3: , sha3_256, sha3_384, sha3_512, keccak_224, keccak_256, keccak_384, keccak_512blake1
- BLAKE: , blake2s, blake2b, blake3ripemd160
- Other: hmac
- KDF: , hkdf, pbkdf2, scrypt, eskdf
1. Pre-compiled: This package contains JavaScript files instead of TypeScript
2. ES Modules only: Uses "type": "module"` in package.json
3. No build dependencies: No TypeScript or build tools required
4. CDN-friendly: Works directly with npm-based CDNs
This is a derivative work of @noble/hashes by Paul Miller.
- 🔒 Audited by independent security firms
- 🔻 Tree-shakeable: unused code is excluded from your builds
- 🏎 Fast: optimized for performance
- 🔍 Reliable: extensive test suite ensures correctness
Please refer to the original security documentation and audits.
MIT License - Same as the original noble-hashes library.
All credit goes to Paul Miller for creating the original noble-hashes library.