Mercurial > projects > dcrypt
comparison dcrypt/crypto/MAC.d @ 28:ad687db713a4
Further reworked the code for hash padding. Replaced all instances of 'char[]' with 'string' and removed a few 'const' modifiers as per Glenn Haecker's patch for D2 compatibility. Updated CONTRIBUTORS file.
author | Thomas Dixon <reikon@reikon.us> |
---|---|
date | Sun, 10 May 2009 22:38:48 -0400 |
parents | 8b5eaf3c2979 |
children | b9ba770b8f16 |
comparison
equal
deleted
inserted
replaced
27:8b5eaf3c2979 | 28:ad687db713a4 |
---|---|
31 * input_ = Data to be processed. | 31 * input_ = Data to be processed. |
32 */ | 32 */ |
33 void update(void[] input_); | 33 void update(void[] input_); |
34 | 34 |
35 /** Returns: The name of this MAC. */ | 35 /** Returns: The name of this MAC. */ |
36 char[] name(); | 36 string name(); |
37 | 37 |
38 /** Reset MAC to its state immediately subsequent the last init. */ | 38 /** Reset MAC to its state immediately subsequent the last init. */ |
39 void reset(); | 39 void reset(); |
40 | 40 |
41 /** Returns: The block size in bytes that this MAC will operate on. */ | 41 /** Returns: The block size in bytes that this MAC will operate on. */ |
46 | 46 |
47 /** Returns: The computed MAC. */ | 47 /** Returns: The computed MAC. */ |
48 ubyte[] digest(); | 48 ubyte[] digest(); |
49 | 49 |
50 /** Returns: The computed MAC in hexadecimal. */ | 50 /** Returns: The computed MAC in hexadecimal. */ |
51 char[] hexDigest() | 51 string hexDigest() |
52 { | 52 { |
53 return ByteConverter.hexEncode(digest()); | 53 return ByteConverter.hexEncode(digest()); |
54 } | 54 } |
55 } | 55 } |