1.0.3 • Published 1 year ago

@jswork/file-hash v1.0.3

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

file-hash

A lightweight library for calculating MD5 and SHA256 hashes of files in the browser.

version license size download

installation

# peer dependencies
npm install crypto-js
# install file-hash
npm install @jswork/file-hash

usage

import { computeMD5, computeSHA256 } from '@jswork/file-hash';

const file = new File(['hello world'], 'hello.txt');
const md5 = await computeMD5(file);
const sha256 = await computeSHA256(file);
console.log(md5, sha256);
// 7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069
// 4f8b42c22dd3729b519ba6f68d2da7cc5b2d606d05daed5ad5128cc03e6c6358

license

Code released under the MIT license.

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago