[Pkg-javascript-commits] [node-sha.js] 149/237: document implemented hashes
Bastien Roucariès
rouca at moszumanska.debian.org
Fri May 5 09:03:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-sha.js.
commit d123901fe28148dce55637ed7942cd4953c9f448
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Tue Sep 16 14:50:16 2014 +0300
document implemented hashes
---
README.md | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 1d50177..8b1024f 100644
--- a/README.md
+++ b/README.md
@@ -9,11 +9,24 @@ Streamable SHA1 hash in pure javascript.
## Example
``` js
-var Sha1 = require('sha.js')
-var h = new Sha1().update('abc', 'utf8').digest('hex')
+var createHash = require('sha.js')
+
+var sha1 = createHash('sha1')
+var sha256 = createHash('sha256')
+var sha512 = createHash'sha512')
+
+var h = sha1.update('abc', 'utf8').digest('hex')
console.log(h) //a9993e364706816aba3e25717850c26c9cd0d89d
```
+## supported hashes
+
+sha.js currently implements:
+
+* sha1
+* sha256
+* sha512
+
## Note
Note, this doesn't actually implement a stream, but wrapping this in a stream is trivial.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-sha.js.git
More information about the Pkg-javascript-commits
mailing list