Package org.bouncycastle.util.test
Class FixedSecureRandom
java.lang.Object
java.util.Random
java.security.SecureRandom
org.bouncycastle.util.test.FixedSecureRandom
- All Implemented Interfaces:
Serializable,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
RandomGenerator.ArbitrarilyJumpableGenerator, RandomGenerator.JumpableGenerator, RandomGenerator.LeapableGenerator, RandomGenerator.SplittableGenerator, RandomGenerator.StreamableGenerator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]generateSeed(int numBytes) booleanvoidnextBytes(byte[] bytes) intnextInt()longnextLong()Methods inherited from class java.security.SecureRandom
getAlgorithm, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceStrong, getParameters, getProvider, getSeed, next, nextBytes, reseed, reseed, setSeed, setSeed, toStringMethods inherited from class java.util.Random
doubles, doubles, doubles, doubles, from, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextDouble, nextFloat, nextGaussian, nextIntMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.random.RandomGenerator
isDeprecated, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextGaussian, nextInt, nextLong, nextLong
-
Constructor Details
-
FixedSecureRandom
-
-
Method Details
-
nextBytes
public void nextBytes(byte[] bytes) - Specified by:
nextBytesin interfaceRandomGenerator- Overrides:
nextBytesin classSecureRandom
-
generateSeed
public byte[] generateSeed(int numBytes) - Overrides:
generateSeedin classSecureRandom
-
nextInt
public int nextInt()- Specified by:
nextIntin interfaceRandomGenerator- Overrides:
nextIntin classRandom
-
nextLong
public long nextLong()- Specified by:
nextLongin interfaceRandomGenerator- Overrides:
nextLongin classRandom
-
isExhausted
public boolean isExhausted()
-