Package org.bouncycastle.util.test
Class TestRandomBigInteger
java.lang.Object
java.util.Random
java.security.SecureRandom
org.bouncycastle.util.test.FixedSecureRandom
org.bouncycastle.util.test.TestRandomBigInteger
- All Implemented Interfaces:
Serializable
,RandomGenerator
A fixed secure random designed to return data for someone needing to create a single BigInteger.
- 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
ConstructorsConstructorDescriptionTestRandomBigInteger
(byte[] encoding) Constructor based on a byte array.TestRandomBigInteger
(int bitLength, byte[] encoding) Constructor which ensures encoding will produce a BigInteger from a request from the passed in bitLength.TestRandomBigInteger
(String encoding) Constructor from a base 10 represention of a BigInteger.TestRandomBigInteger
(String encoding, int radix) Constructor from a base radix represention of a BigInteger. -
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
-
TestRandomBigInteger
Constructor from a base 10 represention of a BigInteger.- Parameters:
encoding
- a base 10 represention of a BigInteger.
-
TestRandomBigInteger
Constructor from a base radix represention of a BigInteger.- Parameters:
encoding
- a String BigInteger of base radix.radix
- the radix to use.
-
TestRandomBigInteger
public TestRandomBigInteger(byte[] encoding) Constructor based on a byte array.- Parameters:
encoding
- a 2's complement representation of the BigInteger.
-
TestRandomBigInteger
public TestRandomBigInteger(int bitLength, byte[] encoding) Constructor which ensures encoding will produce a BigInteger from a request from the passed in bitLength.- Parameters:
bitLength
- bit length for the BigInteger data request.encoding
- bytes making up the encoding.
-