Gathering detailed insights and metrics for hasha
Gathering detailed insights and metrics for hasha
Gathering detailed insights and metrics for hasha
Gathering detailed insights and metrics for hasha
@types/hasha
Stub TypeScript definitions entry for hasha, which provides its own types definitions
@accounter/hashavshevet-mesh
Graphql proxy for Hashavshevet API
hasharray
A data structure that combines a hash and an array for fast dictionary lookup and traversal by complex keys.
hasha-cli
Hashing made simple. Get the hash of text or stdin.
Hashing made simple. Get the hash of a buffer/string/stream/file.
npm install hasha
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.4
Supply Chain
99.5
Quality
75.8
Maintenance
100
Vulnerability
99.6
License
JavaScript (78.42%)
TypeScript (21.58%)
Total Downloads
1,181,194,927
Last Day
395,238
Last Week
6,403,141
Last Month
27,083,003
Last Year
265,320,111
MIT License
957 Stars
60 Commits
32 Forks
11 Watchers
1 Branches
10 Contributors
Updated on May 27, 2025
Minified
Minified + Gzipped
Latest Version
6.0.0
Package Id
hasha@6.0.0
Unpacked Size
14.49 kB
Size
4.49 kB
File Count
6
NPM Version
9.2.0
Node Version
20.9.0
Published on
Nov 11, 2023
Cumulative downloads
Total Downloads
Last Day
0.5%
395,238
Compared to previous day
Last Week
-5.2%
6,403,141
Compared to previous week
Last Month
6.8%
27,083,003
Compared to previous month
Last Year
20.6%
265,320,111
Compared to previous year
Hashing made simple. Get the hash of a buffer/string/stream/file.
Convenience wrapper around the core crypto
Hash class with simpler API and better defaults.
1npm install hasha
1import {hash} from 'hasha'; 2 3await hash('unicorn'); 4//=> 'e233b19aabc7d5e53826fb734d1222f1f0444c3a3fc67ff4af370a66e7cadd2cb24009f1bc86f0bed12ca5fcb226145ad10fc5f650f6ef0959f8aadc5a594b27'
See the Node.js crypto
docs for more about hashing.
The operation is executed using worker_threads
. A thread is lazily spawned on the first operation and lives until the end of the program execution. It's unrefed, so it won't keep the process alive.
Returns a hash asynchronously.
Returns a hash.
Type: Uint8Array | string | Array<Uint8Array | string> | NodeJS.ReadableStream
(NodeJS.ReadableStream
is not available in hashSync
)
The value to hash.
While strings are supported you should prefer buffers as they're faster to hash. Although if you already have a string you should not convert it to a buffer.
Pass an array instead of concatenating strings and/or buffers. The output is the same, but arrays do not incur the overhead of concatenation.
Type: object
Type: string
Default: 'hex'
Values: 'hex' | 'base64' | 'buffer' | 'latin1'
The encoding of the returned hash.
Type: string
Default: 'sha512'
Values: 'md5' | 'sha1' | 'sha256' | 'sha512'
(Platform dependent)
The md5
algorithm is good for file revving, but you should never use md5
or sha1
for anything sensitive. They're insecure.
The operation is executed using worker_threads
. A thread is lazily spawned on the first operation and lives until the end of the program execution. It's unrefed, so it won't keep the process alive.
Returns a Promise
for the calculated file hash.
1import {hashFile} from 'hasha'; 2 3// Get the MD5 hash of an image 4await hashFile('unicorn.png', {algorithm: 'md5'}); 5//=> '1abcb33beeb811dca15f0ac3e47b88d9'
Returns the calculated file hash.
1import {hashFileSync} from 'hasha'; 2 3// Get the MD5 hash of an image 4hashFileSync('unicorn.png', {algorithm: 'md5'}); 5//=> '1abcb33beeb811dca15f0ac3e47b88d9'
Returns a hash transform stream.
1import {hashingStream} from 'hasha'; 2 3// Hash the process input and output the hash sum 4process.stdin.pipe(hashingStream()).pipe(process.stdout);
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 9/30 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More