2004-04-22 Martin Baulig <martin@ximian.com>
[mono.git] / mcs / class / corlib / System.Security.Cryptography / HMACMD5.cs
1 //
2 // HMACMD5.cs: HMAC implementation using MD5
3 //
4 // Author:
5 //      Sebastien Pouliot (spouliot@motus.com)
6 //
7 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
8 //
9
10 #if NET_2_0
11
12 using System;
13
14 using Mono.Security.Cryptography;
15
16 namespace System.Security.Cryptography {
17
18         // References:
19         // a.   Internet RFC 2104, HMAC, Keyed-Hashing for Message Authentication
20         //      (include C source for HMAC-MD5)
21         //      http://www.ietf.org/rfc/rfc2104.txt
22         // b.   IETF RFC2202: Test Cases for HMAC-MD5 and HMAC-SHA-1
23         //      (include C source for HMAC-MD5 and HAMAC-SHA1)
24         //      http://www.ietf.org/rfc/rfc2202.txt
25
26         public class HMACMD5 : HMAC {
27
28                 public HMACMD5 () : this (KeyBuilder.Key (8)) {}
29
30                 public HMACMD5 (byte[] rgbKey) : base ()
31                 {
32                         HashName = "MD5";
33                         HashSizeValue = 128;
34                         Key = rgbKey;
35                 }
36
37                 ~HMACMD5 () 
38                 {
39                         Dispose (false);
40                 }
41         }
42 }
43
44 #endif