package aalg.crypto;

import java.math.BigInteger;

/**
 * Random number generator that is able to generate sequence of random numbers.
 * @author Ing. Petr Ležák
 */
public interface IRandomGenerator {

	/**
	 * Returns random byte.
	 * @return random byte
	 */
	public byte nextByte();

	/**
	 * Returns random BigInterer from range <minNumber; maxNumber).
	 * @param minNumber minimal generated number (inclusive)
	 * @param maxNumber maximal generated number (exclusive)
	 * @return random BigInterer
	 */
	public BigInteger nextNumber(final BigInteger minNumber, final BigInteger maxNumber);
	
	/**
	 * Fills given array with random bytes.
	 * @param array array to fill
	 * @param offset index of first filled byte
	 * @param length number of bytes to fill
	 */
	public void fillArray (final byte[] array, final int offset, final int length);
}
