[Pkg-javascript-commits] [node-sha.js] 38/237: rename to Sha1
Bastien Roucariès
rouca at moszumanska.debian.org
Fri May 5 09:02:53 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 6620d1a9a8598e7cf2799e72a786f5bafbaef7a2
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date: Fri Dec 27 14:33:30 2013 +0700
rename to Sha1
---
index.js | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/index.js b/index.js
index e4785a2..a2f4c61 100644
--- a/index.js
+++ b/index.js
@@ -11,12 +11,12 @@ var hexpp = require('./hexpp').defaults({bigendian: false})
var u = require('./util')
var reverseByteOrder = u.reverseByteOrder
var zeroFill = u.zeroFill
-module.exports = Sha
+module.exports = Sha1
var inherits = require('util').inherits
var Hash = require('./hash')
-inherits(Sha, Hash)
+inherits(Sha1, Hash)
var q = false
var A = 0
@@ -28,7 +28,8 @@ var E = 16
var BE = false
var LE = true
-function Sha () {
+function Sha1 () {
+ if(!(this instanceof Sha1)) return new Sha1()
this._w = new Uint32Array(80)
Hash.call(this, 16*4, 14*4)
@@ -49,7 +50,7 @@ function Sha () {
// assume that array is a Uint32Array with length=16,
// and that if it is the last block, it already has the length and the 1 bit appended.
-Sha.prototype._update = function (array) {
+Sha1.prototype._update = function (array) {
var X = this._dv
var H = this._dvH
@@ -99,7 +100,7 @@ Sha.prototype._update = function (array) {
H.setUint32(D, safe_add(d, _d), BE)
H.setUint32(E, safe_add(e, _e), BE)
- return H.buffer
+ return h
}
/*
--
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