comparison dcrypt/crypto/hashes/SHA224.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
comparison
equal deleted inserted replaced
22:74303a717032 23:4589f8c5eb3c
33 ubyte[] digest() { 33 ubyte[] digest() {
34 padMessage(MODE_SHA); 34 padMessage(MODE_SHA);
35 35
36 ubyte[] result = new ubyte[digestSize]; 36 ubyte[] result = new ubyte[digestSize];
37 37
38 Util.uintToUbytesBig(h0, result, 0); 38 result[0..4] = ByteConverter.BigEndian.from!(uint)(h0);
39 Util.uintToUbytesBig(h1, result, 4); 39 result[4..8] = ByteConverter.BigEndian.from!(uint)(h1);
40 Util.uintToUbytesBig(h2, result, 8); 40 result[8..12] = ByteConverter.BigEndian.from!(uint)(h2);
41 Util.uintToUbytesBig(h3, result, 12); 41 result[12..16] = ByteConverter.BigEndian.from!(uint)(h3);
42 Util.uintToUbytesBig(h4, result, 16); 42 result[16..20] = ByteConverter.BigEndian.from!(uint)(h4);
43 Util.uintToUbytesBig(h5, result, 20); 43 result[20..24] = ByteConverter.BigEndian.from!(uint)(h5);
44 Util.uintToUbytesBig(h6, result, 24); 44 result[24..28] = ByteConverter.BigEndian.from!(uint)(h6);
45 45
46 reset(); 46 reset();
47 return result; 47 return result;
48 } 48 }
49 49