summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2016-04-15 05:48:39 -0700
committerJan Kotas <jkotas@microsoft.com>2016-04-15 05:48:39 -0700
commite811293a69eb4be72921beee4cc1518fe59721be (patch)
tree8e2b8f7462464da23cbe537abaa0f12b75ae53a1 /src
parent6ccefb7afd1c3fd96caf3d6694d6e9441c36362b (diff)
parent680663e8a5783e0bac250293df8157057b1b7cf0 (diff)
downloadcoreclr-e811293a69eb4be72921beee4cc1518fe59721be.tar.gz
coreclr-e811293a69eb4be72921beee4cc1518fe59721be.tar.bz2
coreclr-e811293a69eb4be72921beee4cc1518fe59721be.zip
Merge pull request #4355 from dotnet-bot/from-tfs
Merge changes from TFS
Diffstat (limited to 'src')
-rw-r--r--src/mscorlib/src/System/Collections/Hashtable.cs4
-rw-r--r--src/mscorlib/src/System/IO/Path.cs2
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()