[Pkg-javascript-commits] [node-diffie-hellman] 38/88: test order
Bastien Roucariès
rouca at moszumanska.debian.org
Thu May 4 10:19:15 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-diffie-hellman.
commit e9611e73cc25bb9ee5c4a8469f69536cca1300d8
Author: Calvin Metcalf <calvin.metcalf at state.ma.us>
Date: Fri Dec 5 21:03:28 2014 -0500
test order
---
generatePrime.js | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/generatePrime.js b/generatePrime.js
index 8395f7d..ff9a1d7 100644
--- a/generatePrime.js
+++ b/generatePrime.js
@@ -119,12 +119,9 @@ function findPrime(bits, gen ,crypto) {
n2 = num.shrn(1);
}
runs++;
- if (simpleSieve(n2) &&
- fermatTest(n2) &&
- millerRabin.test(n2) &&
- simpleSieve(num) &&
- fermatTest(num) &&
- millerRabin.test(num)) {
+ if (simpleSieve(n2) && simpleSieve(num) &&
+ fermatTest(n2) && fermatTest(num) &&
+ millerRabin.test(n2) && millerRabin.test(num)) {
return num;
}
num.iadd(comp.major[runs%comp.major.length]);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-diffie-hellman.git
More information about the Pkg-javascript-commits
mailing list