Mercurial > projects > dcrypt
diff dcrypt/crypto/Cipher.d @ 32:2b4bccdc8387
Added version() statements to play nice with D2's current feelings about const. Changed a few methods (addEntropy and read in the base PRNG class, and the constructor for ParametersWithIV) to accept void[] in place of ubyte[].
author | Thomas Dixon <reikon@reikon.us> |
---|---|
date | Tue, 12 May 2009 22:09:33 -0400 |
parents | ad687db713a4 |
children |
line wrap: on
line diff
--- a/dcrypt/crypto/Cipher.d Tue May 12 17:10:47 2009 -0400 +++ b/dcrypt/crypto/Cipher.d Tue May 12 22:09:33 2009 -0400 @@ -45,6 +45,15 @@ */ uint update(void[] input_, void[] output_); + /** Play nice with D2's idea of const. */ + version (D_Version2) + { + uint update(string input_, void[] output_) + { + return update(cast(ubyte[])input_, output_); + } + } + /** Returns: The name of the algorithm of this cipher. */ string name();