summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-05-25 19:03:15 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-05-25 19:03:15 +0000
commitd1baf34ba4d8dbdc574f84bd5ffb3f31124d8cb7 (patch)
tree2446dc5923cb60182ada970b62b788fdc4789235
parentebf50b6ec1ab2e6a6927f9590b63429ecc5dd0f8 (diff)
parentcd904dbfe6866b49fd2dcfc74b442489fc5f335f (diff)
downloadbouncycastle-oreo-m4-s7-release.tar.gz
Merge cherrypicks of [4195647, 4186616, 4186617, 4186167, 4186168, 4186582, 4195648, 4195649, 4195818, 4195819, 4195820, 4195821, 4195858, 4195650, 4195577, 4195859, 4195860, 4195861, 4195862, 4195863, 4195864, 4195865, 4195525, 4195526, 4195527, 4195528, 4195529, 4195530, 4195531, 4195532, 4195533, 4195534, 4195535, 4195536, 4186409, 4186410, 4186411, 4195537, 4195880, 4195881, 4195822, 4195898, 4195866, 4195652, 4195653, 4195582, 4195583, 4195584, 4195585, 4195586, 4195587, 4195588, 4195589, 4195590, 4195591, 4195592, 4195593, 4195594, 4195595, 4195654, 4186583, 4195882, 4195628, 4195629, 4195630, 4195655] into sparse-4732991-L55400000176809537android-8.1.0_r37oreo-m4-s7-release
Change-Id: I0a577bbaf40352e84b01ca9a2959b76807f10b40
-rw-r--r--bcprov/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java b/bcprov/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
index f23f654b..beb1aee2 100644
--- a/bcprov/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
+++ b/bcprov/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
@@ -20,12 +20,10 @@ public class RSAKeyPairGenerator
private static final BigInteger ONE = BigInteger.valueOf(1);
private RSAKeyGenerationParameters param;
- private int iterations;
public void init(KeyGenerationParameters param)
{
this.param = (RSAKeyGenerationParameters)param;
- this.iterations = getNumberOfIterations(this.param.getStrength(), this.param.getCertainty());
}
public AsymmetricCipherKeyPair generateKeyPair()
@@ -191,6 +189,8 @@ public class RSAKeyPairGenerator
protected boolean isProbablePrime(BigInteger x)
{
+ int iterations = getNumberOfIterations(x.bitLength(), param.getCertainty());
+
/*
* Primes class for FIPS 186-4 C.3 primality checking
*/