hash-wasm is a high-performance cryptographic and non-cryptographic hashing library that leverages hand-optimized WebAssembly binaries to deliver fast hashing capabilities in browsers, Node.js, and other JavaScript environments. The library supports a wide range of algorithms, including MD5, SHA variants, BLAKE, Argon2, bcrypt, and xxHash, making it suitable for applications ranging from security to data processing. By compiling optimized C implementations into WebAssembly, hash-wasm achieves significantly better performance compared to pure JavaScript alternatives while maintaining portability across platforms. It supports both simple one-shot hashing and advanced streaming modes, allowing developers to process large datasets incrementally. The architecture is modular, enabling tree-shaking so that only the required algorithms are included in the final bundle, reducing application size.
Features
- Wide support for cryptographic and non-cryptographic hash algorithms
- WebAssembly-based performance significantly faster than JavaScript
- Streaming and chunked hashing for large data processing
- Modular architecture with tree-shaking support
- Concurrent hashing with multiple independent states
- Compatibility with browsers, Node.js, and Deno