TestRandomEntropySourceProvider (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.util.test

## Class TestRandomEntropySourceProvider

- java.lang.Object
- - org.bouncycastle.util.test.TestRandomEntropySourceProvider

- All Implemented Interfaces:
    EntropySourceProvider

      public class TestRandomEntropySourceProvider
      extends java.lang.Object
      implements EntropySourceProvider

  A class for returning "quick entropy" for testing purposes.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestRandomEntropySourceProvider(boolean isPredictionResistant)` Create a test entropy source provider.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `EntropySource` | `get(int bitsRequired)` Return an entropy source that will create bitsRequired bits of entropy on each invocation of getEntropy().

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TestRandomEntropySourceProvider

          public TestRandomEntropySourceProvider(boolean isPredictionResistant)

      Create a test entropy source provider.
      Parameters:
        `isPredictionResistant` - boolean indicating if the SecureRandom is based on prediction resistant entropy or not (true if it is).

  - ### Method Detail

    - #### get

          public EntropySource get(int bitsRequired)

      Return an entropy source that will create bitsRequired bits of entropy on each invocation of getEntropy().
      Specified by:
        `get` in interface `EntropySourceProvider`
      Parameters:
        `bitsRequired` - size (in bits) of entropy to be created by the provided source.
      Returns:
        an EntropySource that generates bitsRequired bits of entropy on each call to its getEntropy() method.