diff dcrypt/misc/ByteConverter.d @ 28:ad687db713a4

Further reworked the code for hash padding. Replaced all instances of 'char[]' with 'string' and removed a few 'const' modifiers as per Glenn Haecker's patch for D2 compatibility. Updated CONTRIBUTORS file.
author Thomas Dixon <reikon@reikon.us>
date Sun, 10 May 2009 22:38:48 -0400
parents 6428dfd7fede
children b9ba770b8f16
line wrap: on
line diff
--- a/dcrypt/misc/ByteConverter.d	Sat May 09 23:29:20 2009 -0400
+++ b/dcrypt/misc/ByteConverter.d	Sun May 10 22:38:48 2009 -0400
@@ -10,7 +10,7 @@
 
 /** Converts between integral types and unsigned byte arrays */
 struct ByteConverter {
-    private static const char[] hexits = "0123456789abcdef";
+    private static const string hexits = "0123456789abcdef";
     
     /** Conversions between little endian integrals and bytes */
     struct LittleEndian {
@@ -128,9 +128,9 @@
         }
     }
 
-    static char[] hexEncode(void[] input_) {
+    static string hexEncode(void[] input_) {
         ubyte[] input = cast(ubyte[])input_;
-        char[] output = new char[input.length<<1];
+        string output = new char[input.length<<1];
         
         int i = 0;
         foreach (ubyte j; input) { 
@@ -140,7 +140,7 @@
         return output;    
     }
     
-    static ubyte[] hexDecode(char[] input) {
+    static ubyte[] hexDecode(string input) {
         ubyte[] output = new ubyte[input.length>>1];
         
         static ubyte[char] hexitIndex;