SecureRandom (Java SE 24 & JDK 24)
- All Implemented Interfaces:
Serializable,RandomGenerator
-
Nested Class Summary
-
Constructor Summary
Constructors
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.
protectedCreates a
SecureRandomobject. -
Method Summary
byte[]generateSeed(int numBytes) Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself.
Returns the name of the algorithm implemented by this
SecureRandomobject.Returns a
SecureRandomobject that implements the specified Random Number Generator (RNG) algorithm.Returns a
SecureRandomobject that implements the specified Random Number Generator (RNG) algorithm.Returns a
SecureRandomobject that implements the specified Random Number Generator (RNG) algorithm.Returns a
SecureRandomobject that implements the specified Random Number Generator (RNG) algorithm and supports the specifiedSecureRandomParametersrequest.Returns a
SecureRandomobject that implements the specified Random Number Generator (RNG) algorithm and supports the specifiedSecureRandomParametersrequest.Returns a
SecureRandomobject that implements the specified Random Number Generator (RNG) algorithm and supports the specifiedSecureRandomParametersrequest.Returns a
SecureRandomobject that was selected by using the algorithms/providers specified in thesecurerandom.strongAlgorithmsSecurityproperty.Returns the provider of this
SecureRandomobject.static byte[]getSeed(int numBytes) Returns the given number of seed bytes, computed using the seed generation algorithm that this class uses to seed itself.
protected final intnext(int numBits) Generates an integer containing the user-specified number of pseudo-random bits (right justified, with leading zeros).
voidnextBytes(byte[] bytes) Generates a user-specified number of random bytes.
voidGenerates a user-specified number of random bytes with additional parameters.
voidreseed()Reseeds this
SecureRandomwith entropy input read from its entropy source.voidReseeds this
SecureRandomwith entropy input read from its entropy source with additional parameters.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.toString()Returns a Human-readable string representation of this
SecureRandom.Methods declared in class java.util.Random
doubles, doubles, doubles, doubles, from, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLongMethods declared in interface java.util.random.RandomGenerator
equiDoubles, isDeprecated, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextGaussian, nextInt, nextLong, nextLong
-
Constructor Details
-
SecureRandom
-
SecureRandom
-
SecureRandom
-
-
Method Details
-
getInstance
-
getInstance
-
getInstance
-
getInstance
-
getInstance
-
getInstance
-
getProvider
-
getAlgorithm
-
toString
-
getParameters
-
setSeed
-
setSeed
-
nextBytes
-
nextBytes
-
next
-
getSeed
-
generateSeed
-
getInstanceStrong
-
reseed
-
reseed
-