A Node.js convenience wrapper for crypto hashing with simpler API, better defaults, and support for buffers, strings, streams, and files.
Hasha is a Node.js library that provides a simplified and optimized interface for cryptographic hashing operations. It wraps the native `crypto` module to offer easier methods for generating hashes from buffers, strings, streams, and files, with better defaults and performance considerations.
Node.js developers who need to perform hashing operations for data integrity, file verification, or checksum generation in their applications.
Developers choose Hasha for its cleaner API, sensible defaults like SHA-512, support for multiple input types, and built-in optimizations like worker thread usage, which reduce the complexity and boilerplate of the native crypto module.
Hashing made simple. Get the hash of a buffer/string/stream/file.
Provides straightforward methods like hash() and hashFile() with sensible defaults such as SHA-512, reducing the boilerplate of Node.js's native crypto module.
Uses worker_threads for asynchronous operations to avoid blocking the main thread, improving performance for concurrent hashing tasks as detailed in the API section.
Handles buffers, strings, arrays, streams, and files with performance tips, such as preferring buffers for speed and using arrays to avoid concatenation overhead.
Includes dedicated hashFile() and hashFileSync() methods for easy file integrity checks, eliminating the need for manual stream handling.
Only supports MD5, SHA1, SHA256, and SHA512, which are platform-dependent and exclude modern algorithms like SHA-3, as noted in the algorithm options.
Lacks browser support, restricting use to server-side environments, unlike related projects such as crypto-hash that work in both Node.js and browsers.
The lazy spawning and persistent worker thread, while unrefed, adds unnecessary complexity for simple synchronous tasks where native crypto might be more efficient.
Git hooks made easy 🐶 woof!
A JavaScript implementation of various web standards, for use with Node.js
Loads environment variables from .env for nodejs projects.
Fix broken node modules instantly 🏃🏽♀️💨
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.