0
|
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.SymmetricCipher;
|
|
10
|
|
11 import dcrypt.crypto.Cipher;
|
|
12 import dcrypt.crypto.params.CipherParameters;
|
|
13
|
|
14 /** Unified cipher class for high-level API. */
|
|
15 interface SymmetricCipher : Cipher {
|
|
16 /**
|
|
17 * Pass bytes through the cipher object.
|
|
18 *
|
|
19 * Params:
|
|
20 * input_ = Array containing input data.
|
|
21 * inOff = Offset at where the data in input_ starts.
|
|
22 * len = Length of input_ to process.
|
|
23 * output_ = Array which will hold the output data.
|
|
24 * outOff = Offset at which to begin placing data in output_.
|
|
25 *
|
|
26 * Returns: The amount of bytes processed.
|
|
27 */
|
|
28 uint update(void[] input_, uint inOff, uint len, void[] output_, uint outOff);
|
|
29
|
|
30 /** Finalize and output the rest of the buffer. */
|
|
31 uint finish(void[] output_, uint outOff);
|
|
32 }
|