Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-04-05 09:59:26 +0300
committerdanmosemsft <danmose@microsoft.com>2017-04-05 09:59:26 +0300
commit6baeb093bb9499b5b7cb2d8142d7bc906d71d0c3 (patch)
tree9f5e9a8da1e03bef4ab9758f3d9340a1dd2520da /src
parent6d584aa1fb5c4b66805d65f98dae4ce45c73b361 (diff)
dead path files
Diffstat (limited to 'src')
-rw-r--r--src/System.Runtime.Extensions/src/System/IO/Path.Unix.cs34
-rw-r--r--src/System.Runtime.Extensions/src/System/IO/Path.Win32.cs36
2 files changed, 0 insertions, 70 deletions
diff --git a/src/System.Runtime.Extensions/src/System/IO/Path.Unix.cs b/src/System.Runtime.Extensions/src/System/IO/Path.Unix.cs
index 3b09bf263e..3df6dc4272 100644
--- a/src/System.Runtime.Extensions/src/System/IO/Path.Unix.cs
+++ b/src/System.Runtime.Extensions/src/System/IO/Path.Unix.cs
@@ -206,40 +206,6 @@ namespace System.IO
return IsPathRooted(path) ? DirectorySeparatorCharAsString : String.Empty;
}
- private static unsafe void GetCryptoRandomBytes(byte* bytes, int byteCount)
- {
- if (Environment.IsMac)
- {
- GetCryptoRandomBytesApple(bytes, byteCount);
- }
- else
- {
- GetCryptoRandomBytesOpenSsl(bytes, byteCount);
- }
- }
-
- private static unsafe void GetCryptoRandomBytesApple(byte* bytes, int byteCount)
- {
- Debug.Assert(bytes != null);
- Debug.Assert(byteCount >= 0);
-
- if (Interop.CommonCrypto.CCRandomGenerateBytes(bytes, byteCount) != 0)
- {
- throw new InvalidOperationException(SR.InvalidOperation_Cryptography);
- }
- }
-
- private static unsafe void GetCryptoRandomBytesOpenSsl(byte* bytes, int byteCount)
- {
- Debug.Assert(bytes != null);
- Debug.Assert(byteCount >= 0);
-
- if (!Interop.Crypto.GetRandomBytes(bytes, byteCount))
- {
- throw new InvalidOperationException(SR.InvalidOperation_Cryptography);
- }
- }
-
/// <summary>Gets whether the system is case-sensitive.</summary>
internal static bool IsCaseSensitive { get { return !s_isMac; } }
}
diff --git a/src/System.Runtime.Extensions/src/System/IO/Path.Win32.cs b/src/System.Runtime.Extensions/src/System/IO/Path.Win32.cs
deleted file mode 100644
index 8a9e62e6e5..0000000000
--- a/src/System.Runtime.Extensions/src/System/IO/Path.Win32.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Diagnostics;
-
-namespace System.IO
-{
- public static partial class Path
- {
- private static unsafe void GetCryptoRandomBytes(byte* bytes, int byteCount)
- {
- // We need to fill a byte array with cryptographically-strong random bytes, but we can't reference
- // System.Security.Cryptography.RandomNumberGenerator.dll due to layering. Instead, we just
- // call to BCryptGenRandom directly, which is all that RandomNumberGenerator does.
-
- Debug.Assert(bytes != null);
- Debug.Assert(byteCount >= 0);
-
- Interop.BCrypt.NTSTATUS status = Interop.BCrypt.BCryptGenRandom(bytes, byteCount);
- if (status == Interop.BCrypt.NTSTATUS.STATUS_SUCCESS)
- {
- return;
- }
- else if (status == Interop.BCrypt.NTSTATUS.STATUS_NO_MEMORY)
- {
- throw new OutOfMemoryException();
- }
- else
- {
- Debug.Fail("BCryptGenRandom should only fail due to OOM or invalid args / handle inputs.");
- throw new InvalidOperationException();
- }
- }
- }
-}