comparison dcrypt/crypto/Hash.d @ 33:b9f8aa42a547

More changes suggested by Glenn Haecker for D2 compatibility.
author Thomas Dixon <reikon@reikon.us>
date Thu, 14 May 2009 01:33:11 -0400
parents 2b4bccdc8387
children
comparison
equal deleted inserted replaced
32:2b4bccdc8387 33:b9f8aa42a547
39 /** Play nice with D2's idea of const. */ 39 /** Play nice with D2's idea of const. */
40 version (D_Version2) 40 version (D_Version2)
41 { 41 {
42 this (string input_) 42 this (string input_)
43 { 43 {
44 return this(cast(ubyte[])input_); 44 this(cast(ubyte[])input_);
45 } 45 }
46 } 46 }
47 47
48 /** Returns: The block size of the hash function in bytes. */ 48 /** Returns: The block size of the hash function in bytes. */
49 abstract uint blockSize(); 49 abstract uint blockSize();
160 /** 160 /**
161 * Same as digest() but returns hash value in hex. 161 * Same as digest() but returns hash value in hex.
162 * 162 *
163 * Returns: Representation of the final hash value in hex. 163 * Returns: Representation of the final hash value in hex.
164 */ 164 */
165 char[] hexDigest() 165 string hexDigest()
166 { 166 {
167 return ByteConverter.hexEncode(digest()); 167 return ByteConverter.hexEncode(digest());
168 } 168 }
169 169
170 /** Reset hash to initial state. */ 170 /** Reset hash to initial state. */