diff dcrypt/misc/ByteConverter.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 f429c5e9dd69
children
line wrap: on
line diff
--- a/dcrypt/misc/ByteConverter.d	Tue May 12 17:10:47 2009 -0400
+++ b/dcrypt/misc/ByteConverter.d	Tue May 12 22:09:33 2009 -0400
@@ -165,6 +165,15 @@
         return cast(string)output;    
     }
     
+    /** Play nice with D2's idea of const. */
+    version (D_Version2)
+    {
+        static string hexEncode(string input_)
+        {
+            return hexEncode(cast(ubyte[])input_);
+        }
+    }
+    
     static ubyte[] hexDecode(string input)
     {
         string inputAsLower = stringToLower(input);