Mercurial > projects > dcrypt
view dcrypt/crypto/BlockCipher.d @ 2:71aae178f89a
Added copy() to hash functions. Modified some code style.
author | Thomas Dixon <reikon@reikon.us> |
---|---|
date | Wed, 13 Aug 2008 22:01:19 -0400 |
parents | 0e08791a1418 |
children | 23c62e28b3a4 |
line wrap: on
line source
/** * This file is part of the dcrypt project. * * Copyright: Copyright (C) dcrypt contributors 2008. All rights reserved. * License: MIT * Authors: Thomas Dixon */ module dcrypt.crypto.BlockCipher; public import dcrypt.crypto.Cipher; public import dcrypt.crypto.params.SymmetricKey; /** Interface for a standard block cipher. */ interface BlockCipher : Cipher { /** Returns: The block size in bytes that this cipher will operate on. */ uint blockSize(); /** * Process a block of data from the input array * and place it into the output array. * * Params: * input_ = Array containing input data. * inOff = Offset at where the data in input_ starts. * output_ = Array which will hold the output data. * outOff = Offset at which to begin placing data in output_. * * Returns: The number of bytes processed (typically blockSize). * * Throws: dcrypt.crypto.errors.NotInitializedError if cipher * was not initialized. */ uint processBlock(void[] input_, uint inOff, void[] output_, uint outOff); }