Class TestRandomData
java.lang.Object
java.util.Random
java.security.SecureRandom
org.bouncycastle.util.test.FixedSecureRandom
org.bouncycastle.util.test.TestRandomData
- All Implemented Interfaces:
Serializable, java.util.random.RandomGenerator
A fixed secure random designed to return data for someone needing random bytes.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class FixedSecureRandom
FixedSecureRandom.BigInteger, FixedSecureRandom.Data, FixedSecureRandom.RollingSHA256, FixedSecureRandom.SourceNested 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
ConstructorsConstructorDescriptionTestRandomData(byte[] encoding) Constructor from an array of bytes.TestRandomData(int bitLength, byte[] data) Constructor from an array of bytes with a minimum bitLength (padding on the left).TestRandomData(int bitLength, String encoding) Constructor from a Hex encoding of the data with a minimum bitLength (padding on the left).TestRandomData(String encoding) Constructor from a Hex encoding of the data. -
Method Summary
Methods inherited from class FixedSecureRandom
generateSeed, isExhausted, nextBytes, nextInt, nextLongMethods 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
-
TestRandomData
Constructor from a Hex encoding of the data.- Parameters:
encoding- a Hex encoding of the data to be returned.
-
TestRandomData
Constructor from a Hex encoding of the data with a minimum bitLength (padding on the left).- Parameters:
bitLength- the mininum bitLength to pad the data to.encoding- a Hex encoding of the data to be included in the padded Data.
-
TestRandomData
public TestRandomData(byte[] encoding) Constructor from an array of bytes.- Parameters:
encoding- a byte array representing the data to be returned.
-
TestRandomData
public TestRandomData(int bitLength, byte[] data) Constructor from an array of bytes with a minimum bitLength (padding on the left).- Parameters:
bitLength- the mininum bitLength to pad the data to.data- the data to be included in the padded Data.
-