8202608: CommonSeeder test needs a white-box testing mechanism to replace the default entropy source

Reviewed-by: xuelei
This commit is contained in:
Weijun Wang 2018-06-26 10:43:43 +08:00
parent 3e7196c114
commit 3ad65642c8
3 changed files with 73 additions and 59 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018, 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
@ -516,7 +516,7 @@ public abstract class AbstractDrbg {
* This object uses {@link SeedGenerator#generateSeed(byte[])} to
* return a byte array containing {@code minLength} bytes. It is
* assumed to support prediction resistance and always contains
* full-entropy. A trusted application can update this field.
* full-entropy.
*/
private final static EntropySource defaultES =
(minE, minLen, maxLen, pr) -> {