diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2004-02-10 02:30:58 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2004-02-10 02:30:58 +0000 |
commit | 8aa15b7589a1b3ff3aa0b43b0fe4febd8aa6f8c7 (patch) | |
tree | ff6b82292fd7d635729e907a506f81dcb8e8323b /nbtheory.cpp | |
parent | 64375b0c68b0bc184a2e88b75645699dca09b745 (diff) | |
download | cryptopp-8aa15b7589a1b3ff3aa0b43b0fe4febd8aa6f8c7.tar.gz |
fix ignoring pSelector in FirstPrime
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@147 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'nbtheory.cpp')
-rw-r--r-- | nbtheory.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nbtheory.cpp b/nbtheory.cpp index 7d857fb..1251423 100644 --- a/nbtheory.cpp +++ b/nbtheory.cpp @@ -379,7 +379,7 @@ bool FirstPrime(Integer &p, const Integer &max, const Integer &equiv, const Inte if (gcd != Integer::One()) { // the only possible prime p such that p%mod==equiv where GCD(mod,equiv)!=1 is GCD(mod,equiv) - if (p <= gcd && gcd <= max && IsPrime(gcd)) + if (p <= gcd && gcd <= max && IsPrime(gcd) && (!pSelector || pSelector->IsAcceptable(gcd))) { p = gcd; return true; |