[Pkg-javascript-commits] [node-sha.js] 55/237: remove final, and force to Uint8Array

Bastien Roucariès rouca at moszumanska.debian.org
Fri May 5 09:02:55 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 c42eb76a6afb318202fd63aff4e6de2145fe4d51
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Fri Dec 27 21:17:40 2013 +0700

    remove final, and force to Uint8Array
---
 hash.js | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/hash.js b/hash.js
index 0911c69..7707020 100644
--- a/hash.js
+++ b/hash.js
@@ -80,15 +80,10 @@ Hash.prototype.digest = function (enc) {
   X.setUint32(fl + 4, len, false) //big endian
 
   var hash = this._update(this._block.buffer)
-  return u.toString(hash, enc)
+  return u.toString(new Uint8Array(hash.buffer || hash), enc)
 }
 
 Hash.prototype._update = function () {
   throw new Error('_update must be implemented by subclass')
 }
 
-Hash.prototype._final = function () {
-  throw new Error('_final must be implemented by subclass')
-}
-
-

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