Blazing fast WASM hashing library powered by Rust. Support for SHA2, SHA3, Keccak, XXHash, and MD5 with streaming support.
npm install @rasmx/hash


@rasmx/hash is a high-performance, universal hashing library for JavaScript and TypeScript, powered by WebAssembly and Rust.
- Blazing Fast: Up to 10-20x faster than pure JS implementations (like crypto-js).
- Streaming Ready: Hash gigabytes of data with zero-copy using browser ReadableStream.
- All-in-One: One tiny package replaces dozens of single-algorithm libraries.
- Modern: Full support for SharedArrayBuffer and ES Modules.
| Family | Variants |
| :--- | :--- |
| SHA2 | 224, 256, 384, 512, 512/224, 512/256 |
| SHA3 | 224, 256, 384, 512 |
| Keccak | 224, 256, 384, 512 |
| XXHash | 32, 64, 3-64, 3-128 (with Seed support) |
| Other | MD5, HMAC-SHA256, HMAC-SHA512, SHAKE128/256 |
``javascript
import { hash } from '@rasmx/hash';
// Simple usage
const hex = await hash.sha2.v256("hello world");
// Streaming large files (Browser)
const result = await hash.stream(file.stream(), new IncrementalSha256());
``