You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.142
Former-commit-id: 7467d4b717762eeaf652d77f1486dd11ffb1ff1f
This commit is contained in:
parent
e52655b4dc
commit
0abdbe5a7d
36
mcs/class/corlib/corefx/Interop.GetRandomBytes.Mono.cs
Normal file
36
mcs/class/corlib/corefx/Interop.GetRandomBytes.Mono.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Security.Cryptography;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
internal partial class Interop
|
||||
{
|
||||
static class MonoGetRandomBytesFallback
|
||||
{
|
||||
static object _rngAccess = new object ();
|
||||
static RNGCryptoServiceProvider _rng;
|
||||
|
||||
internal static void GetRandomBytes (byte[] buffer)
|
||||
{
|
||||
lock (_rngAccess) {
|
||||
if (_rng == null)
|
||||
_rng = new RNGCryptoServiceProvider ();
|
||||
_rng.GetBytes (buffer);
|
||||
}
|
||||
}
|
||||
|
||||
internal static unsafe void GetRandomBytes (byte* buffer, int length)
|
||||
{
|
||||
lock (_rngAccess) {
|
||||
if (_rng == null)
|
||||
_rng = new RNGCryptoServiceProvider ();
|
||||
_rng.GetBytes (buffer, (IntPtr)length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static unsafe void GetRandomBytes (byte* buffer, int length)
|
||||
{
|
||||
MonoGetRandomBytesFallback.GetRandomBytes (buffer, length);
|
||||
}
|
||||
}
|
18
mcs/class/corlib/corefx/Mono.SafePasswordHandle.Unix.cs
Normal file
18
mcs/class/corlib/corefx/Mono.SafePasswordHandle.Unix.cs
Normal file
@ -0,0 +1,18 @@
|
||||
// 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;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Microsoft.Win32.SafeHandles
|
||||
{
|
||||
partial class SafePasswordHandle
|
||||
{
|
||||
internal string Mono_DangerousGetString ()
|
||||
{
|
||||
return Marshal.PtrToStringAnsi (DangerousGetHandle ());
|
||||
}
|
||||
}
|
||||
}
|
18
mcs/class/corlib/corefx/Mono.SafePasswordHandle.Windows.cs
Normal file
18
mcs/class/corlib/corefx/Mono.SafePasswordHandle.Windows.cs
Normal file
@ -0,0 +1,18 @@
|
||||
// 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;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
namespace Microsoft.Win32.SafeHandles
|
||||
{
|
||||
partial class SafePasswordHandle
|
||||
{
|
||||
internal string Mono_DangerousGetString ()
|
||||
{
|
||||
return Marshal.PtrToStringUni (DangerousGetHandle ());
|
||||
}
|
||||
}
|
||||
}
|
@ -36,7 +36,7 @@ using nuint = System.UInt32;
|
||||
|
||||
namespace System.Runtime
|
||||
{
|
||||
static class RuntimeImports
|
||||
static partial class RuntimeImports
|
||||
{
|
||||
internal static unsafe void RhZeroMemory (ref byte b, nuint byteLength)
|
||||
{
|
||||
|
@ -1 +1 @@
|
||||
8ece558dd28f5a3fe538b92be0dd6563dea791da
|
||||
7d6c3d757b2553412e786d3044d3e3d62c801369
|
6
mcs/class/corlib/corefx/SR.missing.cs
Normal file
6
mcs/class/corlib/corefx/SR.missing.cs
Normal file
@ -0,0 +1,6 @@
|
||||
partial class SR
|
||||
{
|
||||
public const string ArgumentOutOfRange_ConsoleKey = "Console key values must be between 0 and 255 inclusive.";
|
||||
public const string Arg_InvalidComObjectException = "Attempt has been made to use a COM object that does not have a backing class factory.";
|
||||
public const string Arg_MustBeNullTerminatedString = "The string must be null-terminated.";
|
||||
}
|
18
mcs/class/corlib/corefx/TimeSpanParse.cs
Normal file
18
mcs/class/corlib/corefx/TimeSpanParse.cs
Normal file
@ -0,0 +1,18 @@
|
||||
// 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;
|
||||
using System.Text;
|
||||
|
||||
namespace System.Globalization
|
||||
{
|
||||
partial class TimeSpanParse
|
||||
{
|
||||
internal static void ValidateStyles (TimeSpanStyles style, String parameterName)
|
||||
{
|
||||
if (style != TimeSpanStyles.None && style != TimeSpanStyles.AssumeNegative)
|
||||
throw new ArgumentException (Environment.GetResourceString ("Argument_InvalidTimeSpanStyles"), parameterName);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user