42 lines
1.2 KiB
Java
42 lines
1.2 KiB
Java
|
package org.bouncycastle.crypto.params;
|
||
|
|
||
|
import java.security.SecureRandom;
|
||
|
import org.bouncycastle.crypto.KeyGenerationParameters;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class NaccacheSternKeyGenerationParameters extends KeyGenerationParameters {
|
||
|
private int certainty;
|
||
|
private int cntSmallPrimes;
|
||
|
private boolean debug;
|
||
|
|
||
|
public boolean isDebug() {
|
||
|
return this.debug;
|
||
|
}
|
||
|
|
||
|
public int getCntSmallPrimes() {
|
||
|
return this.cntSmallPrimes;
|
||
|
}
|
||
|
|
||
|
public int getCertainty() {
|
||
|
return this.certainty;
|
||
|
}
|
||
|
|
||
|
public NaccacheSternKeyGenerationParameters(SecureRandom secureRandom, int i, int i2, int i3, boolean z) {
|
||
|
super(secureRandom, i);
|
||
|
this.debug = false;
|
||
|
this.certainty = i2;
|
||
|
if (i3 % 2 == 1) {
|
||
|
throw new IllegalArgumentException("cntSmallPrimes must be a multiple of 2");
|
||
|
}
|
||
|
if (i3 < 30) {
|
||
|
throw new IllegalArgumentException("cntSmallPrimes must be >= 30 for security reasons");
|
||
|
}
|
||
|
this.cntSmallPrimes = i3;
|
||
|
this.debug = z;
|
||
|
}
|
||
|
|
||
|
public NaccacheSternKeyGenerationParameters(SecureRandom secureRandom, int i, int i2, int i3) {
|
||
|
this(secureRandom, i, i2, i3, false);
|
||
|
}
|
||
|
}
|