diff dcrypt/crypto/hashes/SHA384.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 5cb17e09d685
children 176c933827a8
line wrap: on
line diff
--- a/dcrypt/crypto/hashes/SHA384.d	Sat Jan 10 13:17:58 2009 -0500
+++ b/dcrypt/crypto/hashes/SHA384.d	Sat Feb 14 19:58:20 2009 -0500
@@ -34,12 +34,12 @@
     	padMessage(MODE_SHA);
         ubyte[] result = new ubyte[digestSize];
         
-        Util.ulongToUbytesBig(h0, result, 0);
-        Util.ulongToUbytesBig(h1, result, 8);
-        Util.ulongToUbytesBig(h2, result, 16);
-        Util.ulongToUbytesBig(h3, result, 24);
-        Util.ulongToUbytesBig(h4, result, 32);
-        Util.ulongToUbytesBig(h5, result, 40);
+        result[0..8] = ByteConverter.BigEndian.from!(ulong)(h0);
+        result[8..16] = ByteConverter.BigEndian.from!(ulong)(h1);
+        result[16..24] = ByteConverter.BigEndian.from!(ulong)(h2);
+        result[24..32] = ByteConverter.BigEndian.from!(ulong)(h3);
+        result[32..40] = ByteConverter.BigEndian.from!(ulong)(h4);
+        result[40..48] = ByteConverter.BigEndian.from!(ulong)(h5);
 
         reset();
         return result;