1.0.3 • Published 12 months ago

super-fast-md5 v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

NPM version

Super fast and super small (7kb) wasm version of md5 algorithm, able to use in browser and nodejs. The implementation comes from hash-wasm, We simplify the asynchronous syntax to synchronous syntax.

Online test platform

CDN

<script src="https://unpkg.com/super-fast-md5/dist/md5.umd.js"></script>
<script>
  const hash = FastMD5.md5('code');
  console.log(hash);
</script>

NPM

import { md5 } from 'super-fast-md5';

// code -> `string | ArrayBuffer`
const hash = md5('code');
console.log(hash);

Performance

const code = 'abcde'.repeat(200000);

console.time('string');
FastMD5.md5(code);
console.timeEnd('string'); // 10ms

const buffer = new TextEncoder().encode(code);
console.time('buffer');
FastMD5.md5(buffer);
console.timeEnd('buffer'); // 6ms
./a.js [string] (1024 KiB)
> 10ms

./a.js [buffer] (1024 KiB)
> 6ms
1.0.2

1 year ago

1.0.3

12 months ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago