Bouncy Castle Cryptography Library 1.81

org.bouncycastle.util.test
Class FixedSecureRandom

java.lang.Object
  extended byjava.util.Random
      extended byjava.security.SecureRandom
          extended byorg.bouncycastle.util.test.FixedSecureRandom
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TestRandomBigInteger, TestRandomData

public class FixedSecureRandom
extends java.security.SecureRandom

A secure random that returns pre-seeded data to calls of nextBytes() or generateSeed().

See Also:
Serialized Form

Nested Class Summary
static class FixedSecureRandom.BigInteger
          BigInteger Source - in this case we expect requests for data that will be used for BigIntegers.
static class FixedSecureRandom.Data
          Data Source - in this case we just expect requests for byte arrays.
static class FixedSecureRandom.Source
          Base class for sources of fixed "Randomness"
 
Constructor Summary
FixedSecureRandom(byte[] value)
           
FixedSecureRandom(byte[][] values)
           
FixedSecureRandom(FixedSecureRandom.Source[] sources)
           
 
Method Summary
 byte[] generateSeed(int numBytes)
           
 boolean isExhausted()
           
 void nextBytes(byte[] bytes)
           
 int nextInt()
           
 long nextLong()
           
 
Methods inherited from class java.security.SecureRandom
getInstance, getInstance, getInstance, getProvider, getSeed, next, setSeed, setSeed
 
Methods inherited from class java.util.Random
nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)

generateSeed

public byte[] generateSeed(int numBytes)

nextInt

public int nextInt()

nextLong

public long nextLong()

isExhausted

public boolean isExhausted()

Bouncy Castle Cryptography Library 1.81