1 |
3a515b92
|
cagy
|
# md5.js
|
2 |
|
|
|
3 |
|
|
[](https://www.npmjs.org/package/md5.js)
|
4 |
|
|
[](https://travis-ci.org/crypto-browserify/md5.js)
|
5 |
|
|
[](https://david-dm.org/crypto-browserify/md5.js#info=dependencies)
|
6 |
|
|
|
7 |
|
|
[](https://github.com/feross/standard)
|
8 |
|
|
|
9 |
|
|
Node style `md5` on pure JavaScript.
|
10 |
|
|
|
11 |
|
|
From [NIST SP 800-131A][1]: *md5 is no longer acceptable where collision resistance is required such as digital signatures.*
|
12 |
|
|
|
13 |
|
|
## Example
|
14 |
|
|
|
15 |
|
|
```js
|
16 |
|
|
var MD5 = require('md5.js')
|
17 |
|
|
|
18 |
|
|
console.log(new MD5().update('42').digest('hex'))
|
19 |
|
|
// => a1d0c6e83f027327d8461063f4ac58a6
|
20 |
|
|
|
21 |
|
|
var md5stream = new MD5()
|
22 |
|
|
md5stream.end('42')
|
23 |
|
|
console.log(md5stream.read().toString('hex'))
|
24 |
|
|
// => a1d0c6e83f027327d8461063f4ac58a6
|
25 |
|
|
```
|
26 |
|
|
|
27 |
|
|
## LICENSE [MIT](LICENSE)
|
28 |
|
|
|
29 |
|
|
[1]: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar1.pdf
|