Installations
npm install multihashes
Score
98.7
Supply Chain
96.2
Quality
80.7
Maintenance
100
Vulnerability
99.6
License
Developer
Developer Guide
Module System
CommonJS
Min. Node Version
>=12.0.0
Typescript Support
Yes
Node Version
14.16.0
NPM Version
6.14.11
Statistics
119 Stars
195 Commits
57 Forks
21 Watching
11 Branches
47 Contributors
Updated on 30 Apr 2024
Bundle Size
35.14 kB
Minified
10.58 kB
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
91,319,340
Last day
26.1%
168,729
Compared to previous day
Last week
14.6%
885,131
Compared to previous week
Last month
11.1%
3,141,853
Compared to previous month
Last year
-11%
22,624,210
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
3
Dev Dependencies
3
js-multihash
multihash implementation in node.js
This is the multihash implementation in Node. It is extended by js-multihashing and js-multihashing-async, so give those a look as well.
Lead Maintainer
Table of Contents
Install
Using npm
1> npm install multihashes # NOTE: The name of the module is multihashes!
Using a <script>
tag
Loading this module through a script tag will make the Multihashes
obj available in the global namespace.
1<script src="https://unpkg.com/multihashes/dist/index.min.js"></script>
Usage
1> var multihash = require('multihashes') 2> var bytes = Uint8Array.from([0, 1, 2, 3...]) 3 4> var encoded = multihash.encode(bytes, 'sha1') 5> console.log(encoded) 6<Uint8Array 11 14 0b ee c7 b5 ea 3f 0f db c9 5d 0d d4 7f 3c 5b c2 75 da 8a 33> 7 8> multihash.decode(encoded) 9{ code: 17, 10 name: 'sha1', 11 length: 20, 12 digest: <Uint8Array 0b ee c7 b5 ea 3f 0f db c9 5d 0d d4 7f 3c 5b c2 75 da 8a 33> }
API
https://multiformats.github.io/js-multihash/
Update Constants
To update the constants table run the command below. This will fetch the main codec list from https://raw.githubusercontent.com/multiformats/multicodec/master/table.csv and filter only the multihash codecs and update the constants.js
file in this repo.
1npm run update-constants
Contribute
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.
License
MIT © Protocol Labs Inc.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 7/30 approved changesets -- score normalized to 2
Reason
project is archived
Details
- Warn: Repository is archived.
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/multiformats/js-multihash/main.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:66
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:73
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:80
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:19
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:40
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:49
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:58
- Info: 0 out of 9 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 7 third-party GitHubAction dependencies pinned
- Info: 0 out of 7 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 9 are checked with a SAST tool
Score
3.6
/10
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