package aalg.crypto;

public interface IBlockCipherTransformation {
	/**
	 * Returns cipher.
	 * @return cipher
	 */
	public IBlockCipher getCipher();
	
	/**
	 * Transforms one block of data. Block has getCipher().getBlockLength() bytes.
	 * It is possible to specify both blocks as same arrays even with overlapping. 
	 * @param sourceBlock array with block to transform
	 * @param sourceOffset offset of block to transform
	 * @param targetBlock array with target block
	 * @param targetOffset offset of target block
	 */
	public void transformBlock (final byte[] sourceBlock, final int sourceOffset, final byte[] targetBlock, final int targetOffset);
	
	/**
	 * Sets key for encryption.
	 * @param key encryption key
	 */
	public void setKey (final ISymmetricKey key);
}
