[Pkg-javascript-commits] [node-hash.js] 10/19: utils: remove obscure assignment
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 25 12:00:12 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-hash.js.
commit 8337f232e37e7a12307d83e36ef26585467e391c
Author: Fedor Indutny <fedor at indutny.com>
Date: Tue Jun 27 00:38:02 2017 -0400
utils: remove obscure assignment
---
lib/hash/utils.js | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/lib/hash/utils.js b/lib/hash/utils.js
index 09d7813..3d7d4ea 100644
--- a/lib/hash/utils.js
+++ b/lib/hash/utils.js
@@ -1,9 +1,10 @@
'use strict';
-var utils = exports;
var assert = require('minimalistic-assert');
var inherits = require('inherits');
+exports.inherits = inherits;
+
function toArray(msg, enc) {
if (Array.isArray(msg))
return msg.slice();
@@ -34,7 +35,7 @@ function toArray(msg, enc) {
}
return res;
}
-utils.toArray = toArray;
+exports.toArray = toArray;
function toHex(msg) {
var res = '';
@@ -42,7 +43,7 @@ function toHex(msg) {
res += zero2(msg[i].toString(16));
return res;
}
-utils.toHex = toHex;
+exports.toHex = toHex;
function htonl(w) {
var res = (w >>> 24) |
@@ -51,7 +52,7 @@ function htonl(w) {
((w & 0xff) << 24);
return res >>> 0;
}
-utils.htonl = htonl;
+exports.htonl = htonl;
function toHex32(msg, endian) {
var res = '';
@@ -63,7 +64,7 @@ function toHex32(msg, endian) {
}
return res;
}
-utils.toHex32 = toHex32;
+exports.toHex32 = toHex32;
function zero2(word) {
if (word.length === 1)
@@ -71,7 +72,7 @@ function zero2(word) {
else
return word;
}
-utils.zero2 = zero2;
+exports.zero2 = zero2;
function zero8(word) {
if (word.length === 7)
@@ -91,7 +92,7 @@ function zero8(word) {
else
return word;
}
-utils.zero8 = zero8;
+exports.zero8 = zero8;
function join32(msg, start, end, endian) {
var len = end - start;
@@ -107,7 +108,7 @@ function join32(msg, start, end, endian) {
}
return res;
}
-utils.join32 = join32;
+exports.join32 = join32;
function split32(msg, endian) {
var res = new Array(msg.length * 4);
@@ -127,39 +128,37 @@ function split32(msg, endian) {
}
return res;
}
-utils.split32 = split32;
+exports.split32 = split32;
function rotr32(w, b) {
return (w >>> b) | (w << (32 - b));
}
-utils.rotr32 = rotr32;
+exports.rotr32 = rotr32;
function rotl32(w, b) {
return (w << b) | (w >>> (32 - b));
}
-utils.rotl32 = rotl32;
+exports.rotl32 = rotl32;
function sum32(a, b) {
return (a + b) >>> 0;
}
-utils.sum32 = sum32;
+exports.sum32 = sum32;
function sum32_3(a, b, c) {
return (a + b + c) >>> 0;
}
-utils.sum32_3 = sum32_3;
+exports.sum32_3 = sum32_3;
function sum32_4(a, b, c, d) {
return (a + b + c + d) >>> 0;
}
-utils.sum32_4 = sum32_4;
+exports.sum32_4 = sum32_4;
function sum32_5(a, b, c, d, e) {
return (a + b + c + d + e) >>> 0;
}
-utils.sum32_5 = sum32_5;
-
-utils.inherits = inherits;
+exports.sum32_5 = sum32_5;
function sum64(buf, pos, ah, al) {
var bh = buf[pos];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-hash.js.git
More information about the Pkg-javascript-commits
mailing list