Class TestRandomData

All Implemented Interfaces:
Serializable, RandomGenerator

public class TestRandomData extends FixedSecureRandom
A fixed secure random designed to return data for someone needing random bytes.
See Also:
  • Constructor Details

    • TestRandomData

      public TestRandomData(String encoding)
      Constructor from a Hex encoding of the data.
      Parameters:
      encoding - a Hex encoding of the data to be returned.
    • TestRandomData

      public TestRandomData(int bitLength, String encoding)
      Constructor from a Hex encoding of the data with a minimum bitLength (padding on the left).
      Parameters:
      bitLength - the mininum bitLength to pad the data to.
      encoding - a Hex encoding of the data to be included in the padded Data.
    • TestRandomData

      public TestRandomData(byte[] encoding)
      Constructor from an array of bytes.
      Parameters:
      encoding - a byte array representing the data to be returned.
    • TestRandomData

      public TestRandomData(int bitLength, byte[] data)
      Constructor from an array of bytes with a minimum bitLength (padding on the left).
      Parameters:
      bitLength - the mininum bitLength to pad the data to.
      data - the data to be included in the padded Data.