Merge pull request #799 from kebby/master
[mono.git] / mcs / class / corlib / System.Security.Cryptography / HMACRIPEMD160.cs
index 379917e0315bfbb016726966521dcae7a468268a..38bf12b7a9d63f7bb39820604dc228974120d848 100644 (file)
@@ -2,13 +2,11 @@
 // HMACRIPEMD160.cs: HMAC implementation using RIPEMD160
 //
 // Author:
-//     Sebastien Pouliot (spouliot@motus.com)
+//     Sebastien Pouliot  <sebastien@xamarin.com>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright 2013 Xamarin Inc. (http://www.xamarin.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
-using System;
+using System.Runtime.InteropServices;
 
 using Mono.Security.Cryptography;
 
 namespace System.Security.Cryptography {
 
+       [ComVisible (true)]
        public class HMACRIPEMD160 : HMAC {
 
-               public HMACRIPEMD160 () : this (KeyBuilder.Key (8)) {}
-
-               public HMACRIPEMD160 (byte[] rgbKey) : base () 
+               public HMACRIPEMD160 () 
+                       : this (KeyBuilder.Key (8))
                {
-                       HashName = "RIPEMD160";
-                       HashSizeValue = 160;
-                       Key = rgbKey;
                }
 
-               ~HMACRIPEMD160 () 
+               public HMACRIPEMD160 (byte[] key) : base () 
                {
-                       Dispose (false);
+#if FULL_AOT_RUNTIME
+                       SetHash ("RIPEMD160", new RIPEMD160Managed ());
+#else
+                       HashName = "RIPEMD160";
+#endif
+                       HashSizeValue = 160;
+                       Key = key;
                }
        }
 }
-
-#endif
\ No newline at end of file