@allex/md5
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

@allex/md5

MD5 implements with pure js. supports string, Buffer, ArrayBuffer, Uint8Array

Usage

yarn add @allex/md5 -D
import { md5 } from '@allex/md5'

const testBinaryFile = path.resolve(__dirname, 'files', 'me.png')
const arrayBuffer = fs.readFileSync(testBinaryFile);

describe('use pure js md5-js to test', () => {
  test('md5() with string, arraybuffer', () => {
    expect(md5('allex')).toBe('f5a85798dd7dbaba428299b13f3d2204');
    expect(md5(arrayBuffer)).toBe('f13e8870391a1b1a5f12c3ac8c256583');
  });
});

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @allex/md5

Weekly Downloads

75

Version

1.0.4

License

MIT

Unpacked Size

22.7 kB

Total Files

6

Last publish

Collaborators

  • allex