Package org.bouncycastle.util.test
Class FixedSecureRandom
- java.lang.Object
 - 
- java.util.Random
 - 
- java.security.SecureRandom
 - 
- org.bouncycastle.util.test.FixedSecureRandom
 
 
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable
- Direct Known Subclasses:
 TestRandomBigInteger,TestRandomData
public class FixedSecureRandom extends java.security.SecureRandomA secure random that returns pre-seeded data to calls of nextBytes() or generateSeed().- See Also:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFixedSecureRandom.BigIntegerBigInteger Source - in this case we expect requests for data that will be used for BigIntegers.static classFixedSecureRandom.DataData Source - in this case we just expect requests for byte arrays.static classFixedSecureRandom.SourceBase class for sources of fixed "Randomness" 
- 
Constructor Summary
Constructors Constructor Description FixedSecureRandom(byte[] value)FixedSecureRandom(byte[][] values)FixedSecureRandom(FixedSecureRandom.Source[] sources) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]generateSeed(int numBytes)booleanisExhausted()voidnextBytes(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, toString 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
FixedSecureRandom
public FixedSecureRandom(byte[] value)
 
- 
FixedSecureRandom
public FixedSecureRandom(byte[][] values)
 
- 
FixedSecureRandom
public FixedSecureRandom(FixedSecureRandom.Source[] sources)
 
 - 
 
- 
Method Detail
- 
nextBytes
public void nextBytes(byte[] bytes)
- Overrides:
 nextBytesin classjava.security.SecureRandom
 
- 
generateSeed
public byte[] generateSeed(int numBytes)
- Overrides:
 generateSeedin classjava.security.SecureRandom
 
- 
nextInt
public int nextInt()
- Overrides:
 nextIntin classjava.util.Random
 
- 
nextLong
public long nextLong()
- Overrides:
 nextLongin classjava.util.Random
 
- 
isExhausted
public boolean isExhausted()
 
 - 
 
 -