comparison dcrypt/crypto/MAC.d @ 14:5ce3012f1def

Removed some redundancy in code. Added NotSupportedError, a base PRNG class and a class which creates a PRNG from a hash function. Changed the MAC class' finalization methods to digest and hexDigest instead of finish and hexFinish respectively. Also added a base Checksum class, crc32 and adler32 in dcrypt.misc as per request.
author Thomas Dixon <reikon@reikon.us>
date Tue, 18 Nov 2008 18:03:40 -0500
parents 3de3a2de13a0
children 0de48552be35
comparison
equal deleted inserted replaced
13:7ea528b61802 14:5ce3012f1def
41 41
42 /** Returns: The output size of the MAC in bytes. */ 42 /** Returns: The output size of the MAC in bytes. */
43 uint macSize(); 43 uint macSize();
44 44
45 /** Returns: The computed MAC. */ 45 /** Returns: The computed MAC. */
46 ubyte[] finish(); 46 ubyte[] digest();
47 47
48 /** Returns: The computed MAC in hexadecimal. */ 48 /** Returns: The computed MAC in hexadecimal. */
49 char[] hexFinish() { 49 char[] hexDigest() {
50 return Util.ubytesToHex(finish()); 50 return Util.ubytesToHex(digest());
51 } 51 }
52 } 52 }