org.bouncycastle.util.test
Class FixedSecureRandom

java.lang.Object
  extended by java.util.Random
      extended by java.security.SecureRandom
          extended by org.bouncycastle.util.test.FixedSecureRandom
All Implemented Interfaces:
java.io.Serializable

public class FixedSecureRandom
extends java.security.SecureRandom

See Also:
Serialized Form

Field Summary
private  byte[] _data
           
private  int _index
           
private  int _intPad
           
 
Constructor Summary
FixedSecureRandom(boolean intPad, byte[] value)
          Pad the data on integer boundaries.
FixedSecureRandom(boolean intPad, byte[][] values)
          Pad the data on integer boundaries.
FixedSecureRandom(byte[] value)
           
FixedSecureRandom(byte[][] values)
           
 
Method Summary
 boolean isExhausted()
           
 void nextBytes(byte[] bytes)
           
 int nextInt()
           
 long nextLong()
           
private  int nextValue()
           
 
Methods inherited from class java.security.SecureRandom
generateSeed, getAlgorithm, 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
 

Field Detail

_data

private byte[] _data

_index

private int _index

_intPad

private int _intPad
Constructor Detail

FixedSecureRandom

public FixedSecureRandom(byte[] value)

FixedSecureRandom

public FixedSecureRandom(byte[][] values)

FixedSecureRandom

public FixedSecureRandom(boolean intPad,
                         byte[] value)
Pad the data on integer boundaries. This is necessary for the classpath project's BigInteger implementation.


FixedSecureRandom

public FixedSecureRandom(boolean intPad,
                         byte[][] values)
Pad the data on integer boundaries. This is necessary for the classpath project's BigInteger implementation.

Method Detail

nextBytes

public void nextBytes(byte[] bytes)
Overrides:
nextBytes in class java.security.SecureRandom

nextInt

public int nextInt()
Overrides:
nextInt in class java.util.Random

nextLong

public long nextLong()
Overrides:
nextLong in class java.util.Random

isExhausted

public boolean isExhausted()

nextValue

private int nextValue()