Generates an integer containing the user-specified number of
pseudo-random bits (right justified, with leading zeros). This
method overrides a java.util.Random method, and serves
to provide a source of random bits to all of the methods inherited
from that class (for example, nextInt,
nextLong, and nextFloat).
numBits | number of pseudo-random bits to be generated, where
0 <= numBits <= 32. |
int containing the user-specified number
of pseudo-random bits (right justified, with leading zeros).
Generates a user-specified number of random bytes.
If a call to setSeed had not occurred previously,
the first call to this method forces this SecureRandom object
to seed itself. This self-seeding will not occur if
setSeed was previously called.
bytes | the array to be filled in with random bytes. |
Reseeds this random object, using the eight bytes contained
in the given long seed. The given seed supplements,
rather than replaces, the existing seed. Thus, repeated calls
are guaranteed never to reduce randomness.
This method is defined for compatibility with
java.util.Random.
seed | the seed. |
getSeed
Diagram: Random