package aalg.crypto;

import java.util.Random;

public class TestRandomGenerator extends RandomGeneratorImpl {
	
	private final Random rnd = new Random();

	/**
	 * Returns random byte.
	 * @return random byte
	 */
	@Override
	public byte nextByte() {
		return (byte) rnd.nextInt();
	}

	@Override
	public void fillArray(final byte[] array, final int offset, final int length) {
		for (int i = 0; i < length; i++)
			array[offset + i] = nextByte();
	}

}
