Lines Matching refs:SecureRandom

44  * Additionally, SecureRandom must produce non-deterministic output.
45 * Therefore any seed material passed to a SecureRandom object must be
46 * unpredictable, and all SecureRandom output sequences must be
51 * <p>A caller obtains a SecureRandom instance via the
55 * SecureRandom random = new SecureRandom();
58 * <p> Many SecureRandom implementations are in the form of a pseudo-random
64 * <p> Typical callers of SecureRandom invoke the following methods
68 * SecureRandom random = new SecureRandom();
92 public class SecureRandom extends java.util.Random {
119 private static volatile SecureRandom seedGenerator = null;
127 * A new SecureRandom object encapsulating the
129 * Provider that supports a SecureRandom (RNG) algorithm is returned.
136 * <p> See the SecureRandom section in the <a href=
137 * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
141 * <p> The returned SecureRandom object has not been seeded. To seed the
144 * <code>nextBytes</code> will force the SecureRandom object to seed itself.
148 public SecureRandom() {
161 * The SecureRandom instance is seeded with the specified seed bytes.
165 * A new SecureRandom object encapsulating the
167 * Provider that supports a SecureRandom (RNG) algorithm is returned.
174 * <p> See the SecureRandom section in the <a href=
175 * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
181 public SecureRandom(byte seed[]) {
191 this.secureRandomSpi = new sun.security.provider.SecureRandom();
198 SecureRandom random = SecureRandom.getInstance(prng);
209 // JDK 1.1 based implementations subclass SecureRandom instead of
211 // they must call a SecureRandom constructor as it is their superclass.
214 if (getClass() == SecureRandom.class) {
220 * Creates a SecureRandom object.
222 * @param secureRandomSpi the SecureRandom implementation.
225 protected SecureRandom(SecureRandomSpi secureRandomSpi,
230 private SecureRandom(SecureRandomSpi secureRandomSpi, Provider provider,
239 * Returns a SecureRandom object that implements the specified
244 * A new SecureRandom object encapsulating the
251 * <p> The returned SecureRandom object has not been seeded. To seed the
254 * <code>nextBytes</code> will force the SecureRandom object to seed itself.
259 * See the SecureRandom section in the <a href=
260 * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
264 * @return the new SecureRandom object.
274 public static SecureRandom getInstance(String algorithm)
276 Instance instance = GetInstance.getInstance("SecureRandom",
278 return new SecureRandom((SecureRandomSpi)instance.impl,
283 * Returns a SecureRandom object that implements the specified
286 * <p> A new SecureRandom object encapsulating the
294 * <p> The returned SecureRandom object has not been seeded. To seed the
297 * <code>nextBytes</code> will force the SecureRandom object to seed itself.
302 * See the SecureRandom section in the <a href=
303 * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
309 * @return the new SecureRandom object.
325 public static SecureRandom getInstance(String algorithm, String provider)
327 Instance instance = GetInstance.getInstance("SecureRandom",
329 return new SecureRandom((SecureRandomSpi)instance.impl,
334 * Returns a SecureRandom object that implements the specified
337 * <p> A new SecureRandom object encapsulating the
342 * <p> The returned SecureRandom object has not been seeded. To seed the
345 * <code>nextBytes</code> will force the SecureRandom object to seed itself.
350 * See the SecureRandom section in the <a href=
351 * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
357 * @return the new SecureRandom object.
369 public static SecureRandom getInstance(String algorithm,
371 Instance instance = GetInstance.getInstance("SecureRandom",
373 return new SecureRandom((SecureRandomSpi)instance.impl,
378 * Returns the SecureRandomSpi of this SecureRandom object.
385 * Returns the provider of this SecureRandom object.
387 * @return the provider of this SecureRandom object.
394 * Returns the name of the algorithm implemented by this SecureRandom
447 * the first call to this method forces this SecureRandom object
491 * <code>getInstance</code> methods to obtain a SecureRandom object, and
503 seedGenerator = new SecureRandom();
538 * has registered a SecureRandom implementation, or null if none of the
539 * registered providers supplies a SecureRandom implementation.
544 if (s.getType().equals("SecureRandom")) {
570 * of the SecureRandom class itself.