[Pkg-javascript-commits] [node-sha.js] 62/237: allow subclass to give hash by _hash method

Bastien Roucariès rouca at moszumanska.debian.org
Fri May 5 09:02:57 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 d47673bc4b2b66f46f0eec342f5e424f5147c48d
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Mon Dec 30 19:17:41 2013 +0700

    allow subclass to give hash by _hash method
---
 hash.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hash.js b/hash.js
index 987f4c1..415fdf2 100644
--- a/hash.js
+++ b/hash.js
@@ -82,7 +82,7 @@ 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
 
-  var hash = this._update(this._block.buffer)
+  var hash = this._update(this._block.buffer) || this._hash()
   return u.toString(new Uint8Array(hash.buffer || hash), enc)
 }
 

-- 
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