项目作者: cdimascio

项目描述 :
A node module that hashes data to MD5.
高级语言: JavaScript
项目地址: git://github.com/cdimascio/md5-nodejs.git
创建时间: 2018-10-27T13:47:40Z
项目社区:https://github.com/cdimascio/md5-nodejs

开源协议:MIT License

下载


md5-nodejs


A node module that hashes data to MD5



Install

  1. npm install md5-nodejs

Usage

  1. const md5 = require('md5-nodejs');
  2. const hash = md5('data to hash');

Hash Anything!

Here are some examples

Hash strings

  1. const hash = md5('string to hash');

Hash buffers

  1. const hash = md5(Buffer.from('carmine'));

Hash TypedArrays

  1. const int16Array = new Int16Array(2);
  2. int16Array[0] = 42;
  3. const hash = md5(int16Array);

Hash objects

  1. const hash = md5({
  2. name: 'carmine'
  3. });

Hash arrays

  1. const hash = md5(['hash', 'this', 'array']);

Hash primitives

  1. const hash = md5(3.14159265359);
  2. const hash = md5(true);

License

MIT