246 * {@code SecureRandom.getParameters()}, it is the effective capability.
247 * <p>
248 * Please note that while the {@code Instantiate_function} defined in
249 * NIST SP 800-90Ar1 only includes a {@code prediction_resistance_flag}
250 * parameter, the {@code Capability} type includes an extra value
251 * {@link #RESEED_ONLY} because reseeding is an optional function.
252 * If {@code NONE} is used in an {@code Instantiation} object in calling the
253 * {@code SecureRandom.getInstance} method, the returned DRBG instance
254 * is not guaranteed to support reseeding. If {@code RESEED_ONLY} or
255 * {@code PR_AND_RESEED} is used, the instance must support reseeding.
256 * <p>
257 * The table below lists possible effective values if a certain
258 * capability is requested, i.e.
259 * <blockquote><pre>
260 * Capability requested = ...;
261 * SecureRandom s = SecureRandom.getInstance("DRBG",
262 * DrbgParameters(-1, requested, null));
263 * Capability effective = ((DrbgParametes.Initiate) s.getParameters())
264 * .getCapability();</pre>
265 * </blockquote>
266 * <table border=1 summary="requested and effective capabilities">
267 * <tr>
268 * <th>Requested Value</th>
269 * <th>Possible Effective Values</th>
270 * </tr>
271 * <tr><td>NONE</td><td>NONE, RESEED_ONLY, PR_AND_RESEED</td></tr>
272 * <tr><td>RESEED_ONLY</td><td>RESEED_ONLY, PR_AND_RESEED</td></tr>
273 * <tr><td>PR_AND_RESEED</td><td>PR_AND_RESEED</td></tr>
274 * </table>
275 * <p>
276 * A DRBG implementation supporting prediction resistance must also
277 * support reseeding.
278 *
279 * @since 9
280 */
281 public enum Capability {
282
283 /**
284 * Both prediction resistance and reseed.
285 */
286 PR_AND_RESEED,
287
288 /**
289 * Reseed but no prediction resistance.
290 */
291 RESEED_ONLY,
292
293 /**
|
246 * {@code SecureRandom.getParameters()}, it is the effective capability.
247 * <p>
248 * Please note that while the {@code Instantiate_function} defined in
249 * NIST SP 800-90Ar1 only includes a {@code prediction_resistance_flag}
250 * parameter, the {@code Capability} type includes an extra value
251 * {@link #RESEED_ONLY} because reseeding is an optional function.
252 * If {@code NONE} is used in an {@code Instantiation} object in calling the
253 * {@code SecureRandom.getInstance} method, the returned DRBG instance
254 * is not guaranteed to support reseeding. If {@code RESEED_ONLY} or
255 * {@code PR_AND_RESEED} is used, the instance must support reseeding.
256 * <p>
257 * The table below lists possible effective values if a certain
258 * capability is requested, i.e.
259 * <blockquote><pre>
260 * Capability requested = ...;
261 * SecureRandom s = SecureRandom.getInstance("DRBG",
262 * DrbgParameters(-1, requested, null));
263 * Capability effective = ((DrbgParametes.Initiate) s.getParameters())
264 * .getCapability();</pre>
265 * </blockquote>
266 * <table class="plain">
267 * <caption style="display:none">requested and effective capabilities</caption>
268 * <thead>
269 * <tr>
270 * <th>Requested Value</th>
271 * <th>Possible Effective Values</th>
272 * </tr>
273 * </thead>
274 * <tbody>
275 * <tr><td>NONE</td><td>NONE, RESEED_ONLY, PR_AND_RESEED</td></tr>
276 * <tr><td>RESEED_ONLY</td><td>RESEED_ONLY, PR_AND_RESEED</td></tr>
277 * <tr><td>PR_AND_RESEED</td><td>PR_AND_RESEED</td></tr>
278 * </tbody>
279 * </table>
280 * <p>
281 * A DRBG implementation supporting prediction resistance must also
282 * support reseeding.
283 *
284 * @since 9
285 */
286 public enum Capability {
287
288 /**
289 * Both prediction resistance and reseed.
290 */
291 PR_AND_RESEED,
292
293 /**
294 * Reseed but no prediction resistance.
295 */
296 RESEED_ONLY,
297
298 /**
|