Gathering detailed insights and metrics for multihashing-async
Gathering detailed insights and metrics for multihashing-async
Gathering detailed insights and metrics for multihashing-async
Gathering detailed insights and metrics for multihashing-async
npm install multihashing-async
96.9
Supply Chain
99.5
Quality
81.3
Maintenance
100
Vulnerability
99.6
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
29 Stars
159 Commits
24 Forks
17 Watching
7 Branches
46 Contributors
Updated on 30 Apr 2024
Minified
Minified + Gzipped
JavaScript (99.43%)
TypeScript (0.57%)
Cumulative downloads
Total Downloads
Last day
5.4%
10,366
Compared to previous day
Last week
27.1%
76,235
Compared to previous week
Last month
7.8%
240,245
Compared to previous month
Last year
-40%
2,238,294
Compared to previous year
5
⛔️ DEPRECATED: This module has been superseded by the multiformats module
Use all the functions in multihash.
This module is moving to async/await starting from 0.7.0. The last minor version to support callbacks is 0.6.0, any backports will merged to the branch
callbacks
and released under>0.6.0 <0.7.0
.
crypto
? This module just makes working with multihashes a bit nicer.
js-multihash is only for
encoding/decoding multihashes, and does not depend on other libs.
This module will depend on various implementations for each hash.
It currently uses crypto
and sha3
in Node.js.
In the browser webcrypto
and browserify-sha3
are used.
1$ npm install --save multihashing-async
1const multihashing = require('multihashing-async')
The code published to npm that gets loaded on require is in fact a ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.
1const multihashing = require('multihashing-async')
Loading this module through a script tag will make the multihashing
obj
available in the global namespace.
1<script src="https://unpkg.com/multihashing-async/dist/index.min.js"></script> 2<!-- OR --> 3<script src="https://unpkg.com/multihashing-async/dist/index.js"></script>
1const multihashing = require('multihashing-async') 2const bytes = new TextEncoder().encode('beep boop') 3 4const mh = await multihashing(bytes, 'sha1') 5 6// Use `.digest(...)` if you want only the hash digest (drops the prefix indicating the hash type). 7const digest = await multihashing.digest(bytes, 'sha1') 8 9// Use `.createHash(...)` for the raw hash functions 10const hash = multihashing.createHash('sha1') 11const digest = await hash(bytes)
1const multihashing = require('multihashing-async') 2const bytes = new TextEncoder().encode('beep boop') 3 4const mh = await multihashing(bytes, 'sha1') 5console.log(mh) 6// => <Uint8Array 11 14 7c 83 57 57 7f 51 d4 f0 a8 d3 93 aa 1a aa fb 28 86 3d 94 21> 7 8const mh = await multihashing(bytes, 'sha2-256') 9console.log(mh) 10// => <Uint8Array 12 20 90 ea 68 8e 27 5d 58 05 67 32 50 32 49 2b 59 7b c7 72 21 c6 24 93 e7 63 30 b8 5d dd a1 91 ef 7c> 11 12const mh = await multihashing(bytes, 'sha2-512') 13console.log(mh) 14// => <Uint8Array 13 40 14 f3 01 f3 1b e2 43 f3 4c 56 68 93 78 83 77 1f a3 81 00 2f 1a aa 5f 31 b3 f7 8e 50 0b 66 ff 2f 4f 8e a5 e3 c9 f5 a6 1b d0 73 e2 45 2c 48 04 84 b0 ...>
https://multiformats.github.io/js-multihashing-async/
Contributions welcome. Please check out the issues.
Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS Code of Conduct.
Small note: If editing the README, please conform to the standard-readme specification.
MIT © Protocol Labs Inc.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 3/27 approved changesets -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is archived
Details
Reason
detected GitHub workflow tokens with excessive permissions
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
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
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