comparison dcrypt/crypto/BlockCipher.d @ 0:0e08791a1418

Initial import.
author Thomas Dixon <reikon@reikon.us>
date Sun, 10 Aug 2008 14:20:17 -0400
parents
children 71aae178f89a
comparison
equal deleted inserted replaced
-1:000000000000 0:0e08791a1418
1 /**
2 * This file is part of the dcrypt project.
3 *
4 * Copyright: Copyright (C) dcrypt contributors 2008. All rights reserved.
5 * License: MIT
6 * Authors: Thomas Dixon
7 */
8
9 module dcrypt.crypto.BlockCipher;
10
11 public import dcrypt.crypto.Cipher;
12 public import dcrypt.crypto.params.SymmetricKey;
13
14 /** Interface for a standard block cipher. */
15 abstract class BlockCipher : Cipher {
16
17 /** Returns: The block size in bytes that this cipher will operate on. */
18 uint blockSize();
19
20 /**
21 * Process a block of data from the input array
22 * and place it into the output array.
23 *
24 * Params:
25 * input_ = Array containing input data.
26 * inOff = Offset at where the data in input_ starts.
27 * output_ = Array which will hold the output data.
28 * outOff = Offset at which to begin placing data in output_.
29 *
30 * Returns: The number of bytes processed (typically blockSize).
31 *
32 * Throws: dcrypt.crypto.errors.NotInitializedError if cipher
33 * was not initialized.
34 */
35 uint processBlock(void[] input_,
36 uint inOff, void[] output_, uint outOff);
37
38 }