TARGET_J2EE/JVM fixes
[mono.git] / mcs / class / corlib / System.Configuration.Assemblies / AssemblyHash.cs
index ffa152e639923c4183bdb6e8d0d3e78b5858ffcc..156d1da3f7154bb9994e16da7b30c2b8694ba7ef 100644 (file)
@@ -1,71 +1,94 @@
-\r
-//\r
-// AssemblyHash.cs\r
-//\r
-//    Implementation of the \r
-//    System.Configuration.Assemblies.AssemblyHash\r
-//    class for the Mono Class Library\r
-//\r
-// Author:\r
-//    Tomas Restrepo (tomasr@mvps.org)\r
-//\r
-\r
-namespace System.Configuration.Assemblies {\r
-   \r
-       [Serializable]\r
-   public struct AssemblyHash : System.ICloneable\r
-   {\r
-      private AssemblyHashAlgorithm _algorithm;\r
-      private byte[] _value;\r
-\r
-      public static readonly AssemblyHash Empty = \r
-         new AssemblyHash(AssemblyHashAlgorithm.None,null);\r
-\r
-\r
-      //\r
-      // properties\r
-      //\r
-      public AssemblyHashAlgorithm Algorithm {\r
-         get { return _algorithm; }\r
-         set { _algorithm = value; }\r
-      }\r
-\r
-\r
-      //\r
-      // construction\r
-      //\r
-      public AssemblyHash ( AssemblyHashAlgorithm algorithm, byte[] value )\r
-      {\r
-         _algorithm = algorithm;\r
-         _value = null;\r
-         if ( value != null )\r
-         {\r
-            int size = value.Length;\r
-            _value = new byte[size];\r
-            System.Array.Copy ( value, _value, size );\r
-         }\r
-      }\r
-\r
-      public AssemblyHash ( byte[] value )\r
-         : this(AssemblyHashAlgorithm.SHA1, value)\r
-      {\r
-      }\r
-\r
-      public object Clone()\r
-      {\r
-         return new AssemblyHash(_algorithm,_value);\r
-      }\r
-\r
-      public byte[] GetValue()\r
-      {\r
-         return _value;\r
-      }\r
-      public void SetValue ( byte[] value )\r
-      {\r
-         _value = value;\r
-      }\r
-\r
-   } // class AssemblyHash\r
-\r
-} // namespace System.Configuration.Assemblies\r
-\r
+
+//
+// Copyright (C) 2004 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.
+//
+
+//
+// AssemblyHash.cs
+//
+//    Implementation of the 
+//    System.Configuration.Assemblies.AssemblyHash
+//    class for the Mono Class Library
+//
+// Author:
+//    Tomas Restrepo (tomasr@mvps.org)
+//
+
+namespace System.Configuration.Assemblies {
+   
+       [Serializable]
+   public struct AssemblyHash : System.ICloneable
+   {
+      private AssemblyHashAlgorithm _algorithm;
+      private byte[] _value;
+
+      public static readonly AssemblyHash Empty = 
+         new AssemblyHash(AssemblyHashAlgorithm.None,null);
+
+
+      //
+      // properties
+      //
+      public AssemblyHashAlgorithm Algorithm {
+         get { return _algorithm; }
+         set { _algorithm = value; }
+      }
+
+
+      //
+      // construction
+      //
+      public AssemblyHash ( AssemblyHashAlgorithm algorithm, byte[] value )
+      {
+         _algorithm = algorithm;
+         _value = null;
+         if ( value != null )
+         {
+            int size = value.Length;
+            _value = new byte[size];
+            System.Array.Copy ( value, _value, size );
+         }
+      }
+
+      public AssemblyHash ( byte[] value )
+         : this(AssemblyHashAlgorithm.SHA1, value)
+      {
+      }
+
+      public object Clone()
+      {
+         return new AssemblyHash(_algorithm,_value);
+      }
+
+      public byte[] GetValue()
+      {
+         return _value;
+      }
+      public void SetValue ( byte[] value )
+      {
+         _value = value;
+      }
+
+   } // class AssemblyHash
+
+} // namespace System.Configuration.Assemblies
+