[Pkg-javascript-commits] [node-md5.js] 04/22: Inline fnSum
Bastien Roucariès
rouca at moszumanska.debian.org
Wed Sep 6 09:56:02 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-md5.js.
commit b5b3f2ef5de74979dcae73d5a10b6b5b73fa33e8
Author: Kirill Fomichev <fanatid at ya.ru>
Date: Sat Apr 9 12:58:23 2016 +0300
Inline fnSum
---
.travis.yml | 1 -
index.js | 12 ++++--------
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 85b53b8..d4dedd6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,4 +14,3 @@ matrix:
- node_js: "4"
env: TEST_SUITE=lint
script: npm run-script $TEST_SUITE
-
diff --git a/index.js b/index.js
index 4ae9739..cb85621 100644
--- a/index.js
+++ b/index.js
@@ -124,24 +124,20 @@ function rotl (x, n) {
return ((x << n) | (x >>> (32 - n))) >>> 0
}
-function fnSum (a, f, m, k, s, b) {
- return (rotl(a + (f >>> 0) + m + k, s) + b) >>> 0
-}
-
function fnF (a, b, c, d, m, k, s) {
- return fnSum(a, (b & c) | ((~b) & d), m, k, s, b)
+ return (rotl(a + ((b & c) | ((~b) & d) >>> 0) + m + k, s) + b) >>> 0
}
function fnG (a, b, c, d, m, k, s) {
- return fnSum(a, (b & d) | (c & (~d)), m, k, s, b)
+ return (rotl(a + ((b & d) | (c & (~d)) >>> 0) + m + k, s) + b) >>> 0
}
function fnH (a, b, c, d, m, k, s) {
- return fnSum(a, b ^ c ^ d, m, k, s, b)
+ return (rotl(a + ((b ^ c ^ d) >>> 0) + m + k, s) + b) >>> 0
}
function fnI (a, b, c, d, m, k, s) {
- return fnSum(a, c ^ (b | (~d)), m, k, s, b)
+ return (rotl(a + ((c ^ (b | (~d))) >>> 0) + m + k, s) + b) >>> 0
}
module.exports = MD5
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-md5.js.git
More information about the Pkg-javascript-commits
mailing list