hasha
Hasha is an open-source JavaScript library for Node.js that provides a simple interface to compute hash digests and file checksums. It was created by Sindre Sorhus and published on the npm registry to aid developers in verifying data integrity during software development and deployment. Hasha is designed to be a lightweight wrapper around the Node.js crypto module, supporting a variety of input sources and output formats.
Key features include support for multiple hash algorithms (such as md5, sha1, sha256, sha512, and others), the
Common usage patterns involve hashing a file or a buffer with a promise-based API or a synchronous
const hasha = require('hasha');
hasha.fromFile('path/to/file', { algorithm: 'sha256' }).then(hash => {
});
const hashSync = hasha.fromFileSync('path/to/file', { algorithm: 'sha256' });
Hasha is widely adopted in Node.js projects to streamline integrity checks and reproducible builds, offering a