blob: 15b6d6a55405d413120fec66a1f78a63c2f7223f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package org.bouncycastle.crypto.params;
import java.security.SecureRandom;
import org.bouncycastle.crypto.KeyGenerationParameters;
public class CramerShoupKeyGenerationParameters extends KeyGenerationParameters {
private CramerShoupParameters params;
public CramerShoupKeyGenerationParameters(SecureRandom random, CramerShoupParameters params) {
super(random, getStrength(params));
this.params = params;
}
public CramerShoupParameters getParameters() {
return params;
}
static int getStrength(CramerShoupParameters params) {
return params.getP().bitLength();
}
}
|