Class FixedEntropySourceProvider

  • All Implemented Interfaces:
    EntropySourceProvider

    public class FixedEntropySourceProvider
    extends java.lang.Object
    implements EntropySourceProvider
    An "entropy" provider which returns pre-defined data on request.
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedEntropySourceProvider​(byte[] data, boolean isPredictionResistant)
      Base constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EntropySource get​(int bitsRequired)
      Return an EntropySource based on the data provided to this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FixedEntropySourceProvider

        public FixedEntropySourceProvider​(byte[] data,
                                          boolean isPredictionResistant)
        Base constructor.
        Parameters:
        data - the data that will be returned by EntropySources created by this provider.
        isPredictionResistant - true if the EntropySource should be marked as prediction resistant, false otherwise.
    • Method Detail

      • get

        public EntropySource get​(int bitsRequired)
        Return an EntropySource based on the data provided to this object.
        Specified by:
        get in interface EntropySourceProvider
        Parameters:
        bitsRequired - the size of the block of entropy required.
        Returns:
        a new EntropySource.