Fix problems with overlong directory names: phase #1
[mono.git] / mcs / class / Npgsql / Npgsql / MD5.cs
1 // created on 20/02/2003
2
3 // Npgsql.MD5.cs
4 //
5
6 //
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 //
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // Lesser General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20 //
21
22
23
24 //
25 // System.Security.Cryptography MD5 Class implementation
26 //
27 // Authors:
28 //   Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu)
29 //   Sebastien Pouliot (spouliot@motus.com)
30 //
31 // Copyright 2001 by Matthew S. Ford.
32 // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com)
33 //
34 // Comment: Adapted to the Project from Mono CVS as Sebastien Pouliot suggested to enable
35 // support of Npgsql MD5 authentication in platforms which don't have support for MD5 algorithm.
36 //
37 //
38 //
39
40
41
42
43
44 namespace Npgsql
45 {
46
47
48     /// <summary>
49     /// Common base class for all derived MD5 implementations.
50     /// </summary>
51     internal abstract class MD5 : HashAlgorithm
52     {
53         /// <summary>
54         /// Called from constructor of derived class.
55         /// </summary>
56         // Why is it protected when others abstract hash classes are public ?
57         protected MD5 ()
58         {
59             HashSizeValue = 128;
60         }
61
62         /// <summary>
63         /// Creates the default derived class.
64         /// </summary>
65         public static MD5 Create ()
66         {
67             //return Create ("System.Security.Cryptography.MD5");
68             return new MD5CryptoServiceProvider();
69         }
70
71         /*
72         // Commented out because it uses the CryptoConfig which can't be available in all
73         // platforms.
74         /// <summary>
75         /// Creates a new derived implementation.
76         /// </summary>
77         /// <param name="hashName">Specifies which derived class to create</param>
78         public static new MD5 Create (string hashName)
79         {
80                 return (MD5) CryptoConfig.CreateFromName (hashName);
81         }*/
82
83     }
84 }