Example usage for Java java.security SecureRandom fields, constructors, methods, implement or subclass
The text is from its open source code.
SecureRandom() Constructs a secure random number generator (RNG) implementing the default random number algorithm. | |
SecureRandom(byte[] seed) Constructs a secure random number generator (RNG) implementing the default random number algorithm. |
byte[] | generateSeed(int numBytes) Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself. |
String | getAlgorithm() Returns the name of the algorithm implemented by this SecureRandom object. |
SecureRandom | getInstance(String algorithm) Returns a SecureRandom object that implements the specified Random Number Generator (RNG) algorithm. |
SecureRandom | getInstance(String algorithm, String provider) Returns a SecureRandom object that implements the specified Random Number Generator (RNG) algorithm. |
SecureRandom | getInstance(String algorithm, Provider provider) Returns a SecureRandom object that implements the specified Random Number Generator (RNG) algorithm. |
SecureRandom | getInstance(String algorithm, SecureRandomParameters params) Returns a SecureRandom object that implements the specified Random Number Generator (RNG) algorithm and supports the specified SecureRandomParameters request. |
SecureRandom | getInstanceStrong() Returns a SecureRandom object that was selected by using the algorithms/providers specified in the securerandom.strongAlgorithms Security property. |
Provider | getProvider() Returns the provider of this SecureRandom object. |
byte[] | getSeed(int numBytes) Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself. |
boolean | nextBoolean() Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence. |
void | nextBytes(byte[] bytes) Generates a user-specified number of random bytes. |
double | nextDouble() Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence. |
float | nextFloat() Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence. |
int | nextInt(int bound) Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence. |
int | nextInt() Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence. |
long | nextLong() Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence. |
void | setSeed(byte[] seed) Reseeds this random object with the given seed. |
void | setSeed(long seed) Reseeds this random object, using the eight bytes contained in the given long seed . |
String | toString() Returns a Human-readable string representation of this SecureRandom . |