Mercurial > projects > dcrypt
comparison dcrypt/crypto/macs/HMAC.d @ 6:5cb17e09d685
Minor edits to the unittests of hash functions and ciphers. Added AES and test vectors.
author | Thomas Dixon <reikon@reikon.us> |
---|---|
date | Sat, 16 Aug 2008 22:43:22 -0400 |
parents | 3de3a2de13a0 |
children | 5ce3012f1def |
comparison
equal
deleted
inserted
replaced
5:cff9960a019c | 6:5cb17e09d685 |
---|---|
15 | 15 |
16 version (UnitTest) { | 16 version (UnitTest) { |
17 import dcrypt.crypto.hashes.SHA1; | 17 import dcrypt.crypto.hashes.SHA1; |
18 } | 18 } |
19 | 19 |
20 /** Conforms: RFC2104 */ | 20 /** |
21 * Implementation of Keyed-Hash Message Authentication Code (HMAC) | |
22 * | |
23 * Conforms: RFC 2104 | |
24 * References: http://www.faqs.org/rfcs/rfc2104.html | |
25 */ | |
21 class HMAC : MAC { | 26 class HMAC : MAC { |
22 private { | 27 private { |
23 ubyte[] ipad, opad, key; | 28 ubyte[] ipad, opad, key; |
24 Hash inner, outer; | 29 Hash inner, outer; |
25 bool initialized; | 30 bool initialized; |