New test.
[mono.git] / mcs / class / corlib / System.Security.Cryptography / SHA512.cs
index cf119df03f1cd10364dedf3edf9118dc81b99f1d..a17b8f2b995bfee9b6f78dbaf80baa13b4691d17 100644 (file)
@@ -3,40 +3,55 @@
 //\r
 // Authors:\r
 //   Matthew S. Ford (Matthew.S.Ford@Rose-Hulman.Edu)\r
-//   Sebastien Pouliot (spouliot@motus.com)\r
+//   Sebastien Pouliot <sebastien@ximian.com>
 //\r
 // Copyright 2001 by Matthew S. Ford.\r
 // Portions (C) 2002 Motus Technologies Inc. (http://www.motus.com)\r
-//\r
-\r
-\r
-using System.Security.Cryptography;\r
+// Copyright (C) 2004-2006 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System.Runtime.InteropServices;
 \r
 namespace System.Security.Cryptography {\r
-       /// <summary>\r
-       /// Common base class for all derived SHA512 implementations.\r
-       /// </summary>\r
+
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public abstract class SHA512 : HashAlgorithm {\r
-               /// <summary>\r
-               /// Called from constructor of derived class.\r
-               /// </summary>\r
-               public SHA512 () \r
+
+#if NET_2_0
+               protected SHA512 ()
+#else
+               public SHA512 ()
+#endif\r
                {\r
                        HashSizeValue = 512;\r
                }\r
 \r
-               /// <summary>\r
-               /// Creates the default derived class.\r
-               /// </summary>\r
                public static new SHA512 Create () \r
                {\r
                        return Create ("System.Security.Cryptography.SHA512");\r
                }\r
        \r
-               /// <summary>\r
-               /// Creates a new derived class.\r
-               /// </summary>\r
-               /// <param name="hashName">Specifies which derived class to create</param>\r
                public static new SHA512 Create (string hashName) \r
                {\r
                        return (SHA512) CryptoConfig.CreateFromName (hashName);\r