[corlib] Parse datetime string using culture calendar. Fixes #18052
[mono.git] / mcs / class / corlib / System.Security.Cryptography / HMACSHA256.cs
index 00f0f540a714f4195c077bb8dde6246887319b75..14c208d1fcf0f7d1464ffe8890f1c35cbe1ab438 100644 (file)
@@ -2,10 +2,11 @@
 // HMACSHA256.cs: HMAC implementation using SHA256
 //
 // Author:
-//     Sebastien Pouliot  <sebastien@ximian.com>
+//     Sebastien Pouliot  <sebastien@xamarin.com>
 //
 // (C) 2003 Motus Technologies Inc. (http://www.motus.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
@@ -27,8 +28,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.Runtime.InteropServices;
 
 using Mono.Security.Cryptography;
@@ -43,13 +42,16 @@ namespace System.Security.Cryptography {
                {
                }
 
-               public HMACSHA256 (byte[] rgbKey) : base () 
+               public HMACSHA256 (byte[] key) : base () 
                {
+#if FULL_AOT_RUNTIME
+                       SetHash ("SHA256", new SHA256Managed ());
+#else
                        HashName = "SHA256";
+#endif
                        HashSizeValue = 256;
-                       Key = rgbKey;
+                       Key = key;
                }
        }
 }
 
-#endif