Skip to content
/ md5 Public

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

Notifications You must be signed in to change notification settings

allex/md5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published