Class FixedSecureRandom
java.lang.Object
java.util.Random
java.security.SecureRandom
org.bouncycastle.util.test.FixedSecureRandom
- All Implemented Interfaces:
Serializable, java.util.random.RandomGenerator
- Direct Known Subclasses:
TestRandomBigInteger, TestRandomData
A secure random that returns pre-seeded data to calls of nextBytes() or generateSeed().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBigInteger Source - in this case we expect requests for data that will be used for BigIntegers.static classData Source - in this case we just expect requests for byte arrays.static classstatic classBase class for sources of fixed "Randomness"Nested classes/interfaces inherited from interface java.util.random.RandomGenerator
java.util.random.RandomGenerator.ArbitrarilyJumpableGenerator, java.util.random.RandomGenerator.JumpableGenerator, java.util.random.RandomGenerator.LeapableGenerator, java.util.random.RandomGenerator.SplittableGenerator, java.util.random.RandomGenerator.StreamableGenerator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]generateSeed(int numBytes) booleanvoidnextBytes(byte[] bytes) intnextInt()longnextLong()Methods inherited from class SecureRandom
getAlgorithm, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceStrong, getParameters, getProvider, getSeed, next, nextBytes, reseed, reseed, setSeed, setSeed, toStringMethods inherited from class Random
doubles, doubles, doubles, doubles, from, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextDouble, nextFloat, nextGaussian, nextIntMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.random.RandomGenerator
equiDoubles, isDeprecated, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextGaussian, nextInt, nextLong, nextLong
-
Constructor Details
-
FixedSecureRandom
-
-
Method Details
-
nextBytes
public void nextBytes(byte[] bytes) - Specified by:
nextBytesin interfacejava.util.random.RandomGenerator- Overrides:
nextBytesin classSecureRandom
-
generateSeed
public byte[] generateSeed(int numBytes) - Overrides:
generateSeedin classSecureRandom
-
nextInt
-
nextLong
-
isExhausted
public boolean isExhausted()
-