mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8220730
: sun.security.provider.SecureRandom default constructor has wrong documentation
Reviewed-by: weijun
This commit is contained in:
parent
4e43b28858
commit
62d72dec5e
1 changed files with 16 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -65,16 +65,21 @@ implements java.io.Serializable {
|
||||||
private int remCount;
|
private int remCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This empty constructor automatically seeds the generator. We attempt
|
* An empty constructor that creates an unseeded SecureRandom object.
|
||||||
* to provide sufficient seed bytes to completely randomize the internal
|
* <p>
|
||||||
* state of the generator (20 bytes). Note, however, that our seed
|
* Unless the user calls setSeed(), the first call to engineGetBytes()
|
||||||
* generation algorithm has not been thoroughly studied or widely deployed.
|
* will have the SeedGenerator provide sufficient seed bytes to
|
||||||
*
|
* completely randomize the internal state of the generator (20 bytes).
|
||||||
* <p>The first time this constructor is called in a given Virtual Machine,
|
* Note that the old threaded seed generation algorithm is provided
|
||||||
* it may take several seconds of CPU time to seed the generator, depending
|
* only as a fallback, and has not been thoroughly studied or widely
|
||||||
* on the underlying hardware. Successive calls run quickly because they
|
* deployed.
|
||||||
* rely on the same (internal) pseudo-random number generator for their
|
* <p>
|
||||||
* seed bits.
|
* The SeedGenerator relies on a VM-wide entropy pool to generate
|
||||||
|
* seed bytes for these objects. The first time the SeedGenerator is
|
||||||
|
* called, it may take several seconds of CPU time to initialize,
|
||||||
|
* depending on the underlying hardware. Successive calls run
|
||||||
|
* quickly because they rely on the same (internal) pseudo-random
|
||||||
|
* number generator for their seed bits.
|
||||||
*/
|
*/
|
||||||
public SecureRandom() {
|
public SecureRandom() {
|
||||||
init(null);
|
init(null);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue