1.1.0 • Published 1 year ago

multihash-maker v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Multihash Maker

Multihash Maker is a simple way to create multihashes with no external dependencies.

Read more about multihash and the multihash specification here https://multiformats.io/multihash/

Install

npm install multihash-maker

Usage

import { createMultiHash, parseMultiHash } from '../lib/index';

createMultiHash('Hello World!', 'sha256')
// Returns '22041dd7b6443542e75701aa98a0c235951a28a0d851b11564d20022ab11d2589a8'

parseMultiHash('11148a173fd3e32c0fa78b90fe42d305f202244e2739')
// Returns {
      length: 20,
      hashFunction: "sha1",
      hash: "8a173fd3e32c0fa78b90fe42d305f202244e2739"
    }

Tests

npm test

License

The MIT License

Copyright (c) 2023 Adam Shea

1.1.0

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago