diff dcrypt/crypto/macs/HMAC.d @ 23:4589f8c5eb3c

Replaced dcrypt.crypto.Util with dcrypt.misc.Bitwise and dcrypt.misc.ByteConverter. Altered all dependent files to reflect changes.
author Thomas Dixon <reikon@reikon.us>
date Sat, 14 Feb 2009 19:58:20 -0500
parents 0de48552be35
children 176c933827a8
line wrap: on
line diff
--- a/dcrypt/crypto/macs/HMAC.d	Sat Jan 10 13:17:58 2009 -0500
+++ b/dcrypt/crypto/macs/HMAC.d	Sat Feb 14 19:58:20 2009 -0500
@@ -102,7 +102,7 @@
     }
     
     char[] hexDigest() {
-        return Util.ubytesToHex(digest());
+        return ByteConverter.hexEncode(digest());
     }
     
     HMAC copy() {
@@ -146,13 +146,13 @@
             
             HMAC h = new HMAC(new SHA1());
             foreach (uint i, char[] k; test_keys) {
-                h.init(new SymmetricKey(Util.hexToUbytes(k)));
+                h.init(new SymmetricKey(ByteConverter.hexDecode(k)));
                 for (int j = 0; j < test_repeat[i]; j++)
-                    h.update(Util.hexToUbytes(test_inputs[i]));
+                    h.update(ByteConverter.hexDecode(test_inputs[i]));
                 char[] mac = h.hexDigest();
                 assert(mac == test_results[i], 
                         h.name~": ("~mac~") != ("~test_results[i]~")");
             }
         }
     }
-}
\ No newline at end of file
+}