|
1 | 1 | /*
|
2 |
| - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
@@ -65,16 +65,21 @@ public final class SecureRandom extends SecureRandomSpi
|
65 | 65 | private int remCount;
|
66 | 66 |
|
67 | 67 | /**
|
68 |
| - * This empty constructor automatically seeds the generator. We attempt |
69 |
| - * to provide sufficient seed bytes to completely randomize the internal |
70 |
| - * state of the generator (20 bytes). Note, however, that our seed |
71 |
| - * generation algorithm has not been thoroughly studied or widely deployed. |
72 |
| - * |
73 |
| - * <p>The first time this constructor is called in a given Virtual Machine, |
74 |
| - * it may take several seconds of CPU time to seed the generator, depending |
75 |
| - * on the underlying hardware. Successive calls run quickly because they |
76 |
| - * rely on the same (internal) pseudo-random number generator for their |
77 |
| - * seed bits. |
| 68 | + * An empty constructor that creates an unseeded SecureRandom object. |
| 69 | + * <p> |
| 70 | + * Unless the user calls setSeed(), the first call to engineGetBytes() |
| 71 | + * will have the SeedGenerator provide sufficient seed bytes to |
| 72 | + * completely randomize the internal state of the generator (20 bytes). |
| 73 | + * Note that the old threaded seed generation algorithm is provided |
| 74 | + * only as a fallback, and has not been thoroughly studied or widely |
| 75 | + * deployed. |
| 76 | + * <p> |
| 77 | + * The SeedGenerator relies on a VM-wide entropy pool to generate |
| 78 | + * seed bytes for these objects. The first time the SeedGenerator is |
| 79 | + * called, it may take several seconds of CPU time to initialize, |
| 80 | + * depending on the underlying hardware. Successive calls run |
| 81 | + * quickly because they rely on the same (internal) pseudo-random |
| 82 | + * number generator for their seed bits. |
78 | 83 | */
|
79 | 84 | public SecureRandom() {
|
80 | 85 | init(null);
|
|
0 commit comments