parent
a0c86d7dd7
commit
ee978a4489
9 changed files with 1002 additions and 1 deletions
@ -0,0 +1,101 @@ |
||||
# Change Log |
||||
|
||||
## v0.7.3 / 2017-12-18 |
||||
### Fixed |
||||
- incorrect result when first bit is 1 of bytes. #18 |
||||
|
||||
## v0.7.2 / 2017-10-31 |
||||
### Improved |
||||
- performance of hBytes increment. |
||||
|
||||
## v0.7.1 / 2017-10-29 |
||||
### Fixed |
||||
- incorrect result when file size >= 4G. |
||||
|
||||
## v0.7.0 / 2017-10-29 |
||||
### Fixed |
||||
- incorrect result when file size >= 512M. |
||||
|
||||
## v0.6.1 / 2017-10-07 |
||||
### Fixed |
||||
- ArrayBuffer.isView issue in IE10. |
||||
|
||||
### Improved |
||||
- performance of input check. |
||||
|
||||
## v0.6.0 / 2017-07-28 |
||||
### Added |
||||
- support base64 string output. |
||||
|
||||
## v0.5.0 / 2017-07-14 |
||||
### Added |
||||
- support for web worker. #11 |
||||
|
||||
### Changed |
||||
- throw error if input type is incorrect. |
||||
- prevent webpack to require dependencies. |
||||
|
||||
## v0.4.2 / 2017-01-18 |
||||
### Fixed |
||||
- `root` is undefined in some special environment. #7 |
||||
|
||||
## v0.4.1 / 2016-03-31 |
||||
### Removed |
||||
- length detection in node.js. |
||||
### Deprecated |
||||
- `buffer` and replace by `arrayBuffer`. |
||||
|
||||
## v0.4.0 / 2015-12-28 |
||||
### Added |
||||
- support for update hash. |
||||
- support for bytes array output. |
||||
- support for ArrayBuffer output. |
||||
- support for AMD. |
||||
|
||||
## v0.3.0 / 2015-03-07 |
||||
### Added |
||||
- support byte Array, Uint8Array and ArrayBuffer input. |
||||
|
||||
## v0.2.2 / 2015-02-01 |
||||
### Fixed |
||||
- bug when special length. |
||||
### Improve |
||||
- performance for node.js. |
||||
|
||||
## v0.2.1 / 2015-01-13 |
||||
### Improve |
||||
- performance. |
||||
|
||||
## v0.2.0 / 2015-01-12 |
||||
### Removed |
||||
- ascii parameter. |
||||
### Improve |
||||
- performance. |
||||
|
||||
## v0.1.4 / 2015-01-11 |
||||
### Improve |
||||
- performance. |
||||
### Added |
||||
- test cases. |
||||
|
||||
## v0.1.3 / 2015-01-05 |
||||
### Added |
||||
- bower package. |
||||
- travis. |
||||
- coveralls. |
||||
### Improved |
||||
- performance. |
||||
### Fixed |
||||
- JSHint warnings. |
||||
|
||||
## v0.1.2 / 2014-07-27 |
||||
### Fixed |
||||
- accents bug |
||||
|
||||
## v0.1.1 / 2014-01-05 |
||||
### Changed |
||||
- license |
||||
|
||||
## v0.1.0 / 2014-01-04 |
||||
### Added |
||||
- initial release |
||||
@ -0,0 +1,20 @@ |
||||
Copyright 2014-2017 Chen, Yi-Cyuan |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining |
||||
a copy of this software and associated documentation files (the |
||||
"Software"), to deal in the Software without restriction, including |
||||
without limitation the rights to use, copy, modify, merge, publish, |
||||
distribute, sublicense, and/or sell copies of the Software, and to |
||||
permit persons to whom the Software is furnished to do so, subject to |
||||
the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be |
||||
included in all copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||
@ -0,0 +1,76 @@ |
||||
# js-md5 |
||||
[](https://travis-ci.org/emn178/js-md5) |
||||
[](https://coveralls.io/r/emn178/js-md5?branch=master) |
||||
[](https://nodei.co/npm/js-md5/) |
||||
|
||||
A simple MD5 hash function for JavaScript supports UTF-8 encoding. |
||||
|
||||
## Demo |
||||
[MD5 Online](http://emn178.github.io/online-tools/md5.html) |
||||
[MD5 File Checksum Online](http://emn178.github.io/online-tools/md5_checksum.html) |
||||
|
||||
## Download |
||||
[Compress](https://raw.github.com/emn178/js-md5/master/build/md5.min.js) |
||||
[Uncompress](https://raw.github.com/emn178/js-md5/master/src/md5.js) |
||||
|
||||
## Installation |
||||
You can also install js-md5 by using Bower. |
||||
|
||||
bower install md5 |
||||
|
||||
For node.js, you can use this command to install: |
||||
|
||||
npm install js-md5 |
||||
|
||||
## Notice |
||||
`buffer` method is deprecated. This maybe confuse with Buffer in node.js. Please use `arrayBuffer` instead. |
||||
|
||||
## Usage |
||||
You could use like this: |
||||
```JavaScript |
||||
md5('Message to hash'); |
||||
var hash = md5.create(); |
||||
hash.update('Message to hash'); |
||||
hash.hex(); |
||||
``` |
||||
If you use node.js, you should require the module first: |
||||
```JavaScript |
||||
md5 = require('js-md5'); |
||||
``` |
||||
It supports AMD: |
||||
```JavaScript |
||||
require(['your/path/md5.js'], function(md5) { |
||||
// ... |
||||
}); |
||||
``` |
||||
[See document](https://emn178.github.com/js-md5/doc/) |
||||
|
||||
## Example |
||||
```JavaScript |
||||
md5(''); // d41d8cd98f00b204e9800998ecf8427e |
||||
md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6 |
||||
md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0 |
||||
|
||||
// It also supports UTF-8 encoding |
||||
md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07 |
||||
|
||||
// It also supports byte `Array`, `Uint8Array`, `ArrayBuffer` |
||||
md5([]); // d41d8cd98f00b204e9800998ecf8427e |
||||
md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e |
||||
|
||||
// Different output |
||||
md5(''); // d41d8cd98f00b204e9800998ecf8427e |
||||
md5.hex(''); // d41d8cd98f00b204e9800998ecf8427e |
||||
md5.array(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126] |
||||
md5.digest(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126] |
||||
md5.arrayBuffer(''); // ArrayBuffer |
||||
md5.buffer(''); // ArrayBuffer, deprecated, This maybe confuse with Buffer in node.js. Please use arrayBuffer instead. |
||||
md5.base64(''); // 1B2M2Y8AsgTpgAmY7PhCfg== |
||||
``` |
||||
|
||||
## License |
||||
The project is released under the [MIT license](http://www.opensource.org/licenses/MIT). |
||||
|
||||
## Contact |
||||
The project's website is located at https://github.com/emn178/js-md5 |
||||
Author: Chen, Yi-Cyuan (emn178@gmail.com) |
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,74 @@ |
||||
{ |
||||
"_from": "js-md5", |
||||
"_id": "js-md5@0.7.3", |
||||
"_inBundle": false, |
||||
"_integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==", |
||||
"_location": "/js-md5", |
||||
"_phantomChildren": {}, |
||||
"_requested": { |
||||
"type": "tag", |
||||
"registry": true, |
||||
"raw": "js-md5", |
||||
"name": "js-md5", |
||||
"escapedName": "js-md5", |
||||
"rawSpec": "", |
||||
"saveSpec": null, |
||||
"fetchSpec": "latest" |
||||
}, |
||||
"_requiredBy": [ |
||||
"#USER", |
||||
"/" |
||||
], |
||||
"_resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz", |
||||
"_shasum": "b4f2fbb0b327455f598d6727e38ec272cd09c3f2", |
||||
"_spec": "js-md5", |
||||
"_where": "F:\\uniapp\\zhentou_app", |
||||
"author": { |
||||
"name": "Chen, Yi-Cyuan", |
||||
"email": "emn178@gmail.com" |
||||
}, |
||||
"bugs": { |
||||
"url": "https://github.com/emn178/js-md5/issues" |
||||
}, |
||||
"bundleDependencies": false, |
||||
"deprecated": false, |
||||
"description": "A simple MD5 hash function for JavaScript supports UTF-8 encoding.", |
||||
"devDependencies": { |
||||
"expect.js": "~0.3.1", |
||||
"jsdoc": "^3.4.0", |
||||
"mocha": "~2.3.4", |
||||
"nyc": "^11.3.0", |
||||
"requirejs": "^2.1.22", |
||||
"uglify-js": "^3.1.9", |
||||
"webworker-threads": "^0.7.11" |
||||
}, |
||||
"homepage": "https://github.com/emn178/js-md5", |
||||
"keywords": [ |
||||
"md5", |
||||
"hash", |
||||
"encryption", |
||||
"cryptography", |
||||
"HMAC" |
||||
], |
||||
"license": "MIT", |
||||
"main": "src/md5.js", |
||||
"name": "js-md5", |
||||
"nyc": { |
||||
"exclude": [ |
||||
"tests" |
||||
] |
||||
}, |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "git+https://github.com/emn178/js-md5.git" |
||||
}, |
||||
"scripts": { |
||||
"build": "npm run-script compress;npm run-script doc", |
||||
"compress": "uglifyjs src/md5.js -c -m eval --comments --output build/md5.min.js", |
||||
"coveralls": "nyc report --reporter=text-lcov | coveralls", |
||||
"doc": "rm -rf doc;jsdoc src README.md -d doc", |
||||
"report": "nyc --reporter=html --reporter=text mocha tests/node-test.js", |
||||
"test": "nyc mocha tests/node-test.js" |
||||
}, |
||||
"version": "0.7.3" |
||||
} |
||||
Loading…
Reference in new issue