Java java.security SecureRandom fields, constructors, methods, implement or subclass

Example usage for Java java.security SecureRandom fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.security SecureRandom.

The text is from its open source code.

Subclass

java.security.SecureRandom has subclasses.
Click this link to see all its subclasses.

Implementation

java.security.SecureRandom has the following implementations.
Click this link to see all its implementation.

Constructor

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.

Method

byte[]generateSeed(int numBytes)
Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself.
StringgetAlgorithm()
Returns the name of the algorithm implemented by this SecureRandom object.
SecureRandomgetInstance(String algorithm)
Returns a SecureRandom object that implements the specified Random Number Generator (RNG) algorithm.
SecureRandomgetInstance(String algorithm, String provider)
Returns a SecureRandom object that implements the specified Random Number Generator (RNG) algorithm.
SecureRandomgetInstance(String algorithm, Provider provider)
Returns a SecureRandom object that implements the specified Random Number Generator (RNG) algorithm.
SecureRandomgetInstance(String algorithm, SecureRandomParameters params)
Returns a SecureRandom object that implements the specified Random Number Generator (RNG) algorithm and supports the specified SecureRandomParameters request.
SecureRandomgetInstanceStrong()
Returns a SecureRandom object that was selected by using the algorithms/providers specified in the securerandom.strongAlgorithms Security property.
ProvidergetProvider()
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.
booleannextBoolean()
Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.
voidnextBytes(byte[] bytes)
Generates a user-specified number of random bytes.
doublenextDouble()
Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.
floatnextFloat()
Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.
intnextInt(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.
intnextInt()
Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.
longnextLong()
Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.
voidsetSeed(byte[] seed)
Reseeds this random object with the given seed.
voidsetSeed(long seed)
Reseeds this random object, using the eight bytes contained in the given long seed .
StringtoString()
Returns a Human-readable string representation of this SecureRandom .