[Pkg-javascript-commits] [node-sha.js] 20/237: convert to string
Bastien Roucariès
rouca at moszumanska.debian.org
Fri May 5 09:02:51 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 abe5373aaf0742cf10dc82b879c0848e22a611fe
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Fri Dec 27 08:27:32 2013 +0700
convert to string
---
hash.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hash.js b/hash.js
index 07ae790..57d99e9 100644
--- a/hash.js
+++ b/hash.js
@@ -1,5 +1,5 @@
var u = require('./util')
-var hexpp = require('./hexpp').defaults({bigendian: true})
+var hexpp = require('./hexpp').defaults({bigendian: false})
module.exports = Hash
@@ -69,7 +69,9 @@ Hash.prototype.digest = function (enc) {
//TODO: handle case where the bit length is > Math.pow(2, 29)
X.setUint32(fl + 4, len, false) //big endian
- return this._update(this._block.buffer)
+ var hash = this._update(this._block.buffer)
+ if(!enc) return hash
+ return u.toHex(hash)
}
Hash.prototype._update = function () {
--
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