mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8260274: Cipher.init(int, key) does not use highest priority provider for random bytes
Reviewed-by: ascarpino, xuelei
This commit is contained in:
parent
6aa28b3bdb
commit
434a399bea
8 changed files with 243 additions and 19 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -309,7 +309,7 @@ public class AlgorithmParameterGenerator {
|
|||
* @param size the size (number of bits).
|
||||
*/
|
||||
public final void init(int size) {
|
||||
paramGenSpi.engineInit(size, JCAUtil.getSecureRandom());
|
||||
paramGenSpi.engineInit(size, JCAUtil.getDefSecureRandom());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -340,7 +340,7 @@ public class AlgorithmParameterGenerator {
|
|||
*/
|
||||
public final void init(AlgorithmParameterSpec genParamSpec)
|
||||
throws InvalidAlgorithmParameterException {
|
||||
paramGenSpi.engineInit(genParamSpec, JCAUtil.getSecureRandom());
|
||||
paramGenSpi.engineInit(genParamSpec, JCAUtil.getDefSecureRandom());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue