diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-04-15 05:48:39 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-04-15 05:48:39 -0700 |
commit | e811293a69eb4be72921beee4cc1518fe59721be (patch) | |
tree | 8e2b8f7462464da23cbe537abaa0f12b75ae53a1 | |
parent | 6ccefb7afd1c3fd96caf3d6694d6e9441c36362b (diff) | |
parent | 680663e8a5783e0bac250293df8157057b1b7cf0 (diff) | |
download | coreclr-e811293a69eb4be72921beee4cc1518fe59721be.tar.gz coreclr-e811293a69eb4be72921beee4cc1518fe59721be.tar.bz2 coreclr-e811293a69eb4be72921beee4cc1518fe59721be.zip |
Merge pull request #4355 from dotnet-bot/from-tfs
Merge changes from TFS
-rw-r--r-- | src/mscorlib/src/System/Collections/Hashtable.cs | 4 | ||||
-rw-r--r-- | src/mscorlib/src/System/IO/Path.cs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mscorlib/src/System/Collections/Hashtable.cs b/src/mscorlib/src/System/Collections/Hashtable.cs index fa39fc85b0..95676d0379 100644 --- a/src/mscorlib/src/System/Collections/Hashtable.cs +++ b/src/mscorlib/src/System/Collections/Hashtable.cs @@ -1805,6 +1805,7 @@ namespace System.Collections { private const int bufferSize = 1024; #if !FEATURE_CORECLR + private static RandomNumberGenerator rng; #endif private static byte[] data; private static int currentIndex = bufferSize; @@ -1822,8 +1823,7 @@ namespace System.Collections { data = new byte[bufferSize]; Contract.Assert(bufferSize % 8 == 0, "We increment our current index by 8, so our buffer size must be a multiple of 8"); #if !FEATURE_CORECLR - Microsoft.Win32.Win32Native.CryptAcquireContext(out hCryptProv, null, null, - Microsoft.Win32.Win32Native.PROV_RSA_FULL, Microsoft.Win32.Win32Native.CRYPT_VERIFYCONTEXT); + rng = RandomNumberGenerator.Create(); #endif } diff --git a/src/mscorlib/src/System/IO/Path.cs b/src/mscorlib/src/System/IO/Path.cs index f8f19ed690..6f247c2c33 100644 --- a/src/mscorlib/src/System/IO/Path.cs +++ b/src/mscorlib/src/System/IO/Path.cs @@ -908,7 +908,7 @@ namespace System.IO { // Returns a cryptographically strong random 8.3 string that can be // used as either a folder name or a file name. -#if FEATURE_PAL +#if FEATURE_CORECLR [System.Security.SecuritySafeCritical] #endif public static String GetRandomFileName() |