Class SP800SecureRandom

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

public class SP800SecureRandom extends SecureRandom
See Also:
  • Method Details

    • setSeed

      public void setSeed(byte[] seed)
      Overrides:
      setSeed in class SecureRandom
    • setSeed

      public void setSeed(long seed)
      Overrides:
      setSeed in class SecureRandom
    • getAlgorithm

      public String getAlgorithm()
      Overrides:
      getAlgorithm in class SecureRandom
    • nextBytes

      public void nextBytes(byte[] bytes)
      Specified by:
      nextBytes in interface RandomGenerator
      Overrides:
      nextBytes in class SecureRandom
    • nextBytes

      public void nextBytes(byte[] bytes, byte[] additionalInput)
      Generate a user-specified number of random bytes, passing additional input to the DRBG.
      Parameters:
      bytes - the array to be filled in with random bytes.
      additionalInput - optional additional input for the DRBG, may be null (cast a literal null to byte[], as Java 9 and later also have SecureRandom.nextBytes(byte[], SecureRandomParameters)).
    • generateSeed

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

      public void reseed(byte[] additionalInput)
      Force a reseed of the DRBG
      Parameters:
      additionalInput - optional additional input