npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@quicore/hash

v1.2.0

Published

A lightweight utility for fast access to the most commonly used hashing algorithms including SHA, Blake2, and PBKDF2

Readme

@quicore/hash

A lightweight utility for fast access to the most commonly used hashing algorithms including SHA, Blake2, and PBKDF2.

@quicore/hash provides a simple and unified interface to widely-used cryptographic hashing functions. It wraps Node.js' native crypto module to offer convenient helpers for generating SHA, BLAKE2, SHA3, PBKDF2, and other hashes, as well as Base62-encoded compact IDs.


✨ Features

  • 🔒 Fast, secure hash generation (SHA-256, SHA-512, SHA3, BLAKE2, PBKDF2)
  • 🧠 Compact Base62-encoded hashes for short unique identifiers
  • 💡 Unified interface for all supported algorithms
  • ⚠️ Legacy algorithm support (MD5, SHA-1, RIPEMD160) with deprecation warnings
  • 🔋 Zero dependencies, fully built on Node.js native crypto

📦 Installation

npm install @quicore/hash

🚀 Usage

import { GenerateHash } from '@quicore/hash';

// SHA-256
const sha = GenerateHash.SHA256('hello');

// Compact ID (Base62 encoded Blake2b hash)
const id = GenerateHash.compactHash('[email protected]');

// PBKDF2
const derivedKey = GenerateHash.PBKDF2('password123', 'random-salt');

// SHA3-256
const sha3 = GenerateHash.SHA3_256('some input');

🔐 API Reference

Hash Functions

| Method | Description | | ---------------------- | ------------------------------------------------ | | SHA256(input) | Generates a SHA-256 hex hash | | SHA512(input) | Generates a SHA-512 hex hash | | SHA1(input) | ⚠️ Deprecated. SHA-1 hash | | MD5(input) | ⚠️ Deprecated. MD5 hash | | SHA3_256(input) | SHA3-256 hex hash | | SHA3_512(input) | SHA3-512 hex hash | | RIPEMD160(input) | RIPEMD160 hex hash | | BLAKE2s256(input) | BLAKE2s-256 hex hash | | blake2b(input, size) | Returns a Buffer from BLAKE2b hash | | PBKDF2(password, salt) | PBKDF2 w/ SHA-512 (100,000 iterations, 64 bytes) |

Utility

| Method | Description | | ----------------------- | ----------------------------------------------- | | compactHash(input, len) | Returns Base62-encoded BLAKE2b digest | | toBase62(buffer, len) | Encodes Buffer to Base62 string of given length |


📏 Defaults

  • Base62 alphabet: 0-9, a-z, A-Z
  • Default Base62 ID length: 22 characters
  • Minimum Base62 ID length: 10 characters
  • BLAKE2b default digest size: 20 bytes
  • PBKDF2: 100,000 iterations, SHA-512, 64-byte output

🛑 Deprecated Algorithms

  • MD5
  • SHA-1

These are retained for non-security use cases (e.g., checksum comparisons) but are not recommended for cryptographic use.


📚 Use Cases

  • ID and slug generation for URLs, database keys
  • Password hashing with PBKDF2
  • Content fingerprinting or data integrity checks
  • Simple cryptographic utilities for CLI or server-side apps

🧪 Example: Mongo-Friendly ID

const id = GenerateHash.compactHash('file_upload_123');
// e.g., "03xr9SDcKVUuAkcBfYzLpT"

📜 License

MIT