Mercurial > projects > dcrypt
diff dcrypt/crypto/SymmetricCipher.d @ 0:0e08791a1418
Initial import.
author | Thomas Dixon <reikon@reikon.us> |
---|---|
date | Sun, 10 Aug 2008 14:20:17 -0400 |
parents | |
children | 23c62e28b3a4 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dcrypt/crypto/SymmetricCipher.d Sun Aug 10 14:20:17 2008 -0400 @@ -0,0 +1,32 @@ +/** + * 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.SymmetricCipher; + +import dcrypt.crypto.Cipher; +import dcrypt.crypto.params.CipherParameters; + +/** Unified cipher class for high-level API. */ +interface SymmetricCipher : Cipher { + /** + * Pass bytes through the cipher object. + * + * Params: + * input_ = Array containing input data. + * inOff = Offset at where the data in input_ starts. + * len = Length of input_ to process. + * output_ = Array which will hold the output data. + * outOff = Offset at which to begin placing data in output_. + * + * Returns: The amount of bytes processed. + */ + uint update(void[] input_, uint inOff, uint len, void[] output_, uint outOff); + + /** Finalize and output the rest of the buffer. */ + uint finish(void[] output_, uint outOff); +}