Class FixedSecureRandom

java.lang.Object
java.util.Random
java.security.SecureRandom
org.bouncycastle.util.test.FixedSecureRandom
All Implemented Interfaces:
Serializable, java.util.random.RandomGenerator
Direct Known Subclasses:
TestRandomBigInteger, TestRandomData

public class FixedSecureRandom extends SecureRandom
A secure random that returns pre-seeded data to calls of nextBytes() or generateSeed().
See Also:
  • Constructor Details

    • FixedSecureRandom

      public FixedSecureRandom(byte[] value)
    • FixedSecureRandom

      public FixedSecureRandom(byte[][] values)
    • FixedSecureRandom

      public FixedSecureRandom(FixedSecureRandom.Source[] sources)
  • Method Details

    • nextBytes

      public void nextBytes(byte[] bytes)
      Specified by:
      nextBytes in interface java.util.random.RandomGenerator
      Overrides:
      nextBytes in class SecureRandom
    • generateSeed

      public byte[] generateSeed(int numBytes)
      Overrides:
      generateSeed in class SecureRandom
    • nextInt

      public int nextInt()
      Specified by:
      nextInt in interface java.util.random.RandomGenerator
      Overrides:
      nextInt in class Random
    • nextLong

      public long nextLong()
      Specified by:
      nextLong in interface java.util.random.RandomGenerator
      Overrides:
      nextLong in class Random
    • isExhausted

      public boolean isExhausted()