8211049: Second parameter of "initialize" method is not used

Use the specified random object instead of system default

Reviewed-by: weijun
This commit is contained in:
Valerie Peng 2018-11-07 01:04:26 +00:00
parent 9ba72c0c2c
commit c8c41d1444
2 changed files with 61 additions and 1 deletions

View file

@ -70,7 +70,7 @@ public abstract class RSAKeyPairGenerator extends KeyPairGeneratorSpi {
public void initialize(int keySize, SecureRandom random) {
try {
initialize(new RSAKeyGenParameterSpec(keySize,
RSAKeyGenParameterSpec.F4), null);
RSAKeyGenParameterSpec.F4), random);
} catch (InvalidAlgorithmParameterException iape) {
throw new InvalidParameterException(iape.getMessage());
}