Package org.bouncycastle.util.test
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
,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 org.bouncycastle.util.test.FixedSecureRandom
FixedSecureRandom.BigInteger, FixedSecureRandom.Data, FixedSecureRandom.RollingSHA256, FixedSecureRandom.Source
Nested classes/interfaces inherited from interface java.util.random.RandomGenerator
RandomGenerator.ArbitrarilyJumpableGenerator, RandomGenerator.JumpableGenerator, RandomGenerator.LeapableGenerator, RandomGenerator.SplittableGenerator, 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 org.bouncycastle.util.test.FixedSecureRandom
generateSeed, isExhausted, nextBytes, nextInt, nextLong
Methods inherited from class java.security.SecureRandom
getAlgorithm, getInstance, getInstance, getInstance, getInstance, getInstance, getInstance, getInstanceStrong, getParameters, getProvider, getSeed, next, nextBytes, reseed, reseed, setSeed, setSeed, toString
Methods inherited from class java.util.Random
doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.random.RandomGenerator
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.
-