/md5-js

计算文件md5值,可在命令行使用

Primary LanguageJavaScriptMIT LicenseMIT

md5-js

md5 library and cli tools for javascript

CLI Installation

npm i -g md5-js

CLI Usage

md5 example.txt
md5 "hello world"

Script Usage

<script src="md5-min.js"></script>
<script>
    var hash = md5('hellow world');
    alert(hash);
</script>

Node.js Usage

var fs = require('fs');
var md5 = require('md5-js');

console.log(md5('hellow world'));

fs.readFile('example.txt', function(err, buf) {
  console.log(md5(buf));
});