aboutsummaryrefslogtreecommitdiff
path: root/node_modules/sha.js/README.md
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-03 15:35:00 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-03 15:35:00 +0200
commitde98e0b232509d5f40c135d540a70e415272ff85 (patch)
treea79222a5b58484ab3b80d18efcaaa7ccc4769b33 /node_modules/sha.js/README.md
parente0c9d480a73fa629c1e4a47d3e721f1d2d345406 (diff)
node_modules
Diffstat (limited to 'node_modules/sha.js/README.md')
-rw-r--r--node_modules/sha.js/README.md54
1 files changed, 54 insertions, 0 deletions
diff --git a/node_modules/sha.js/README.md b/node_modules/sha.js/README.md
new file mode 100644
index 000000000..fbce2319b
--- /dev/null
+++ b/node_modules/sha.js/README.md
@@ -0,0 +1,54 @@
+# sha.js
+
+Streamable SHA hashes in pure javascript.
+
+[![build status](https://secure.travis-ci.org/crypto-browserify/sha.js.png)](http://travis-ci.org/crypto-browserify/sha.js)
+[![NPM](http://img.shields.io/npm/v/sha.js.svg)](https://www.npmjs.org/package/sha.js)
+
+
+## Example
+
+``` js
+var createHash = require('sha.js')
+
+var sha256 = createHash('sha256')
+var sha512 = createHash('sha512')
+
+var h = sha256.update('abc', 'utf8').digest('hex')
+console.log(h) //ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
+
+//LEGACY, do not use in new systems:
+var sha0 = createHash('sha')
+var sha1 = createHash('sha1')
+
+
+```
+
+## supported hashes
+
+sha.js currently implements:
+
+
+* sha256
+* sha512
+* sha1 (legacy, no not use in new systems)
+* sha (legacy, no not use in new systems)
+
+## Note
+
+Note, this doesn't actually implement a stream, but wrapping this in a stream is trivial.
+but is does update incrementally, so you can hash things larger than ram, and also, since it reuses
+the typedarrays, it uses a constant amount of memory (except when using base64 or utf8 encoding,
+see code comments)
+
+
+## Acknowledgements
+
+This work is derived from Paul Johnston's ["A JavaScript implementation of the Secure Hash Algorithm"]
+(http://pajhome.org.uk/crypt/md5/sha1.html)
+
+
+
+## License
+
+MIT