Class FixedSecureRandom

java.lang.Object
java.util.Random
java.security.SecureRandom
org.bouncycastle.crypto.prng.FixedSecureRandom
All Implemented Interfaces:
Serializable, java.util.random.RandomGenerator

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(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 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()