[Pkg-javascript-commits] [node-sha.js] 25/237: tidy

Bastien Roucariès rouca at moszumanska.debian.org
Fri May 5 09:02:52 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 2313658f0330b3b851ba55ada7f9ab8a11734802
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Fri Dec 27 09:01:51 2013 +0700

    tidy
---
 hash.js  | 2 +-
 index.js | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hash.js b/hash.js
index c45e4ec..3c93ecf 100644
--- a/hash.js
+++ b/hash.js
@@ -63,7 +63,7 @@ Hash.prototype.digest = function (enc) {
   
   if(bits >= fl*8) {
     this._update(this._block.buffer)
-    u.zeroFill(this._x, 0)
+    u.zeroFill(this._block, 0)
   }
 
   //TODO: handle case where the bit length is > Math.pow(2, 29)
diff --git a/index.js b/index.js
index bdcd11c..1cd0568 100644
--- a/index.js
+++ b/index.js
@@ -46,7 +46,7 @@ function Sha () {
   H.setUint32(D, 0x76543210, LE)
   H.setUint32(E, 0xf0e1d2c3, LE)
 
-  this._x = this._block
+//  this._x = this._block
   this._len = 0
 
 }
@@ -57,11 +57,11 @@ function Sha () {
 
 Sha.prototype._update = function (array) {
 
-  var X = this._dvX
-  var W = this._dvW
+  var X = this._dv
   var H = this._dvH
   
   var h = this._h
+
   var a = _a = H.getUint32(A, BE)
   var b = _b = H.getUint32(B, BE)
   var c = _c = H.getUint32(C, BE)
@@ -70,7 +70,7 @@ Sha.prototype._update = function (array) {
 
   var i = 0
   var w = this._w
-  var x = this._x
+  var x = this._block
 
   console.log('--- Update ---')
   console.log(hexpp(x))

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