mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed some stray zeros that were still being passed as null pointers
This commit is contained in:
parent
1eb3de3312
commit
6fda0bffca
54 changed files with 237 additions and 221 deletions
|
|
@ -52,7 +52,7 @@ public:
|
|||
*/
|
||||
static BigInteger createProbablePrime (int bitLength,
|
||||
int certainty,
|
||||
const int* randomSeeds = 0,
|
||||
const int* randomSeeds = nullptr,
|
||||
int numRandomSeeds = 0);
|
||||
|
||||
/** Tests a number to see if it's prime.
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ void RSAKey::createKeyPair (RSAKey& publicKey, RSAKey& privateKey,
|
|||
jassert (numRandomSeeds == 0 || numRandomSeeds >= 2); // you need to provide plenty of seeds here!
|
||||
|
||||
BigInteger p (Primes::createProbablePrime (numBits / 2, 30, randomSeeds, numRandomSeeds / 2));
|
||||
BigInteger q (Primes::createProbablePrime (numBits - numBits / 2, 30, randomSeeds == nullptr ? 0 : (randomSeeds + numRandomSeeds / 2), numRandomSeeds - numRandomSeeds / 2));
|
||||
BigInteger q (Primes::createProbablePrime (numBits - numBits / 2, 30, randomSeeds == nullptr ? nullptr : (randomSeeds + numRandomSeeds / 2), numRandomSeeds - numRandomSeeds / 2));
|
||||
|
||||
const BigInteger n (p * q);
|
||||
const BigInteger m (--p * --q);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue