3367 references to Length
aspire (3)
Aspire.Dashboard (4)
Aspire.Hosting (5)
Aspire.Playground.Tests (1)
http2cat (40)
IIS.FunctionalTests (40)
IIS.LongTests (40)
IIS.NewHandler.FunctionalTests (40)
IIS.NewShim.FunctionalTests (40)
IIS.ShadowCopy.Tests (11)
IISExpress.FunctionalTests (40)
illink (14)
InMemory.FunctionalTests (11)
Microsoft.AspNetCore.Components (11)
Microsoft.AspNetCore.Components.Endpoints (2)
Microsoft.AspNetCore.Components.Forms (6)
Microsoft.AspNetCore.Components.QuickGrid (1)
Microsoft.AspNetCore.Components.Server (11)
Microsoft.AspNetCore.Components.Server.Tests (6)
Microsoft.AspNetCore.Components.Web (6)
Microsoft.AspNetCore.DataProtection (13)
Microsoft.AspNetCore.DataProtection.Tests (1)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions (15)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Extensions (23)
Microsoft.AspNetCore.HttpLogging (23)
Microsoft.AspNetCore.Identity.FunctionalTests (12)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.OutputCaching (4)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
Microsoft.AspNetCore.Razor.Runtime (2)
Microsoft.AspNetCore.Routing (14)
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
Microsoft.AspNetCore.Server.HttpSys (19)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (38)
Microsoft.AspNetCore.Server.IIS (26)
Microsoft.AspNetCore.Server.Kestrel.Core (71)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (12)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
Microsoft.AspNetCore.Shared.Tests (69)
Microsoft.AspNetCore.SignalR.Client.Tests (1)
Microsoft.AspNetCore.SignalR.Common (1)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
Microsoft.AspNetCore.StaticAssets (1)
Microsoft.AspNetCore.StaticAssets.Tests (1)
Microsoft.AspNetCore.WebSockets (23)
Microsoft.AspNetCore.WebUtilities (9)
Microsoft.Build (6)
Microsoft.Build.Engine.OM.UnitTests (3)
Microsoft.Build.Framework (6)
Microsoft.Build.Tasks.Core (3)
Microsoft.Build.Utilities.Core (3)
Microsoft.CodeAnalysis (21)
Microsoft.CodeAnalysis.CodeStyle (19)
Microsoft.CodeAnalysis.Collections.Package (8)
Microsoft.CodeAnalysis.InteractiveHost (8)
Microsoft.CodeAnalysis.Threading.Package (8)
Microsoft.CodeAnalysis.Workspaces (22)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (8)
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
Microsoft.Data.Analysis (32)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.AI.OpenAI (3)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Compliance.Abstractions (3)
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Microsoft.Extensions.Compliance.Redaction (1)
Microsoft.Extensions.Compliance.Testing (1)
Microsoft.Extensions.Diagnostics (1)
Microsoft.Extensions.Identity.Core (8)
Microsoft.Extensions.Logging.Abstractions (14)
Microsoft.Extensions.Telemetry (3)
Microsoft.Extensions.Telemetry.Tests (1)
Microsoft.ML.Core (10)
Microsoft.ML.Core.Tests (4)
Microsoft.ML.CpuMath (35)
Microsoft.ML.Data (12)
Microsoft.ML.DataView (5)
Microsoft.ML.ImageAnalytics (3)
Microsoft.ML.KMeansClustering (1)
Microsoft.ML.StandardTrainers (5)
Microsoft.ML.TestFrameworkCommon (1)
Microsoft.ML.Tokenizers (130)
Microsoft.ML.Tokenizers.Tests (27)
src\Microsoft.ML.Tokenizers\Utils\Helpers.netstandard.cs (6)
76return Encoding.UTF8.GetBytes(sourcePtr, source.Length, destPtr, destination.Length);
85if (Encoding.UTF8.GetByteCount(sourcePtr, source.Length) <= destination.Length)
87bytesWritten = Encoding.UTF8.GetBytes(sourcePtr, source.Length, destPtr, destination.Length);
109return Encoding.UTF8.GetChars(bytesPtr, bytes.Length, charsPtr, chars.Length);
115for (int i = 0; i < span.Length; i++)
122Debug.Assert(source.Length <= destination.Length);
Microsoft.ML.Transforms (6)
Microsoft.Net.Http.Headers (2)
MSBuild (3)
PresentationCore (8)
PresentationCore.Tests (6)
System\Windows\Media\Imaging\WriteableBitmap.Tests.cs (6)
101smallRect.Length, tileSize * channels, 0, 0);
105smallRect.Length, tileSize * channels, width - tileSize, 0);
109smallRect.Length, tileSize * channels, (width - tileSize) / 2, (height - tileSize) / 2);
113smallRect.Length, tileSize * channels, 0, height - tileSize);
117smallRect.Length, tileSize * channels, width - tileSize, height - tileSize);
166bigRect.Length * channels, width * channels, 0, 0);
PresentationFramework (3)
ReachFramework (1)
Shared (2)
System.Collections (2)
System.Collections.Immutable (14)
System.Collections.Specialized (2)
System.Console (22)
System.Data.Common (8)
System.Diagnostics.DiagnosticSource (25)
System.Diagnostics.FileVersionInfo (5)
System.Diagnostics.Process (25)
System.Diagnostics.TextWriterTraceListener (1)
System.Formats.Asn1 (17)
System.Formats.Cbor (6)
System.Formats.Nrbf (1)
System.Formats.Tar (29)
System.IO.Compression (30)
System\IO\Compression\ZipBlocks.cs (7)
440int bytesRead = stream.ReadAtLeast(blockContents, blockContents.Length, throwOnEndOfStream: false);
519int bytesRead = stream.ReadAtLeast(blockContents, blockContents.Length, throwOnEndOfStream: false);
633Debug.Assert(blockBytes.Length == FieldLengths.FilenameLength + FieldLengths.ExtraFieldLength);
665int bytesRead = stream.ReadAtLeast(blockBytes, blockBytes.Length, throwOnEndOfStream: false);
670bytesRead = stream.ReadAtLeast(blockBytes, blockBytes.Length, throwOnEndOfStream: false);
822Debug.Assert(bytesToRead == collatedHeader[remainingBufferLength..].Length);
962int bytesRead = stream.ReadAtLeast(blockContents, blockContents.Length, throwOnEndOfStream: false);
System.IO.Compression.Brotli (15)
System.IO.FileSystem.Watcher (14)
System.IO.Hashing (17)
System.IO.Packaging (2)
System.IO.Pipelines (2)
System.IO.Pipes (1)
System.IO.Ports (1)
System.Linq (18)
System.Memory (14)
System.Memory.Data (5)
System.Net.Http (111)
System.Net.HttpListener (5)
System.Net.Mail (26)
System.Net.NameResolution (7)
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (7)
81err = Interop.Sys.SetAddressFamily(rawAddress, buffer.Length, (int)family);
106err = Interop.Sys.SetPort(rawAddress, buffer.Length, port);
132err = Interop.Sys.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144err = Interop.Sys.SetIPv4Address(rawAddress, buffer.Length, address);
161SetIPv6Address(buffer, rawInput, address.Length, scope);
170err = Interop.Sys.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
181buffer[0] = (byte)Math.Min(buffer.Length, 255);
System.Net.NetworkInformation (4)
System.Net.Ping (9)
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (7)
81err = Interop.Sys.SetAddressFamily(rawAddress, buffer.Length, (int)family);
106err = Interop.Sys.SetPort(rawAddress, buffer.Length, port);
132err = Interop.Sys.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144err = Interop.Sys.SetIPv4Address(rawAddress, buffer.Length, address);
161SetIPv6Address(buffer, rawInput, address.Length, scope);
170err = Interop.Sys.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
181buffer[0] = (byte)Math.Min(buffer.Length, 255);
System.Net.Primitives (18)
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (7)
81err = Interop.Sys.SetAddressFamily(rawAddress, buffer.Length, (int)family);
106err = Interop.Sys.SetPort(rawAddress, buffer.Length, port);
132err = Interop.Sys.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144err = Interop.Sys.SetIPv4Address(rawAddress, buffer.Length, address);
161SetIPv6Address(buffer, rawInput, address.Length, scope);
170err = Interop.Sys.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
181buffer[0] = (byte)Math.Min(buffer.Length, 255);
System.Net.Quic (22)
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (7)
81err = Interop.Sys.SetAddressFamily(rawAddress, buffer.Length, (int)family);
106err = Interop.Sys.SetPort(rawAddress, buffer.Length, port);
132err = Interop.Sys.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144err = Interop.Sys.SetIPv4Address(rawAddress, buffer.Length, address);
161SetIPv6Address(buffer, rawInput, address.Length, scope);
170err = Interop.Sys.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
181buffer[0] = (byte)Math.Min(buffer.Length, 255);
System.Net.Requests (1)
System.Net.Security (25)
System.Net.ServerSentEvents (3)
System.Net.Sockets (38)
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (7)
81err = Interop.Sys.SetAddressFamily(rawAddress, buffer.Length, (int)family);
106err = Interop.Sys.SetPort(rawAddress, buffer.Length, port);
132err = Interop.Sys.GetIPv6Address(rawAddress, buffer.Length, ipAddress, address.Length, &localScope);
144err = Interop.Sys.SetIPv4Address(rawAddress, buffer.Length, address);
161SetIPv6Address(buffer, rawInput, address.Length, scope);
170err = Interop.Sys.SetIPv6Address(rawAddress, buffer.Length, address, addressLength, scope);
181buffer[0] = (byte)Math.Min(buffer.Length, 255);
System\Net\Sockets\SocketPal.Unix.cs (21)
113received = Interop.Sys.Read(handle, b, buffer.Length);
131buffer.Length,
155Count = (UIntPtr)buffer.Length
158Debug.Assert(socketAddress.Length != 0 || sockAddr == null);
162SocketAddressLen = socketAddress.Length,
414int sockAddrLen = socketAddress.Length;
498Count = (UIntPtr)buffer.Length
501Debug.Assert(socketAddress.Length != 0 || rawSocketAddress == null);
505SocketAddressLen = socketAddress.Length,
531socketAddressLen = socketAddress.Length;
580SocketAddressLen = socketAddress.Length,
603socketAddressLen = socketAddress.Length;
685if (data.Length > 0)
688err = Interop.Sys.Connectx(socket, rawSocketAddress, socketAddress.Length, data, data.Length, tfo ? 1 : 0, &sentBytes);
785else if (buffer.Length == 0)
853else if (buffer.Length == 0)
1686Debug.Assert((uint)optionLength <= optionValue.Length);
1851Interop.Error err = Interop.Sys.Select(readFDs, readFDs.Length, writeFDs, writeFDs.Length, errorFDs, errorFDs.Length, microseconds, maxFd, out triggered);
1894Debug.Assert(buffer.Length == socketList.Count);
System.Net.WebClient (3)
System.Net.WebSockets (16)
System.Numerics.Tensors (81)
System.Private.CoreLib (487)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (44)
125if (keys.Length > 1)
127IntroSort(keys, 2 * (BitOperations.Log2((uint)keys.Length) + 1), comparer);
140int partitionSize = keys.Length;
181Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
184int hi = keys.Length - 1;
222int n = keys.Length;
260for (int i = 0; i < keys.Length - 1; i++)
289if (keys.Length > 1)
299if (nanLeft == keys.Length)
306IntroSort(keys, 2 * (BitOperations.Log2((uint)keys.Length) + 1));
416int partitionSize = keys.Length;
460Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
464ref T lastRef = ref Unsafe.Add(ref zeroRef, keys.Length - 1);
465ref T middleRef = ref Unsafe.Add(ref zeroRef, (keys.Length - 1) >> 1);
471ref T nextToLastRef = ref Unsafe.Add(ref zeroRef, keys.Length - 2);
511int n = keys.Length;
547for (int i = 0; i < keys.Length - 1; i++)
636Debug.Assert(0 <= i && i < keys.Length && i < values.Length);
637Debug.Assert(0 <= j && j < keys.Length && j < values.Length);
669Debug.Assert(keys.Length == values.Length);
671if (keys.Length > 1)
673IntroSort(keys, values, 2 * (BitOperations.Log2((uint)keys.Length) + 1), comparer);
680Debug.Assert(values.Length == keys.Length);
684int partitionSize = keys.Length;
725Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
728int hi = keys.Length - 1;
766int n = keys.Length;
810for (int i = 0; i < keys.Length - 1; i++)
840if (keys.Length > 1)
850if (nanLeft == keys.Length)
858IntroSort(keys, values, 2 * (BitOperations.Log2((uint)keys.Length) + 1));
910Debug.Assert(values.Length == keys.Length);
913int partitionSize = keys.Length;
954Debug.Assert(keys.Length >= Array.IntrosortSizeThreshold);
956int hi = keys.Length - 1;
1001int n = keys.Length;
1041for (int i = 0; i < keys.Length - 1; i++)
1117for (int i = 0; i < keys.Length; i++)
1127if ((uint)i < (uint)values.Length) // check to see if we have values
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (7)
769actualSortKeyLength = Interop.Globalization.GetSortKey(_sortHandle, pSource, source.Length, pDest, destination.Length, options);
775if ((uint)actualSortKeyLength > (uint)destination.Length)
777if (actualSortKeyLength > destination.Length)
882sortKeyLength = Interop.Globalization.GetSortKey(_sortHandle, pSource, source.Length, pSortKey, sortKey.Length, options);
886if (sortKeyLength > sortKey.Length) // slow path for big strings
905sortKeyLength = Interop.Globalization.GetSortKey(_sortHandle, pSource, source.Length, pSortKey, sortKey.Length, options);
911if (sortKeyLength == 0 || sortKeyLength > sortKey.Length) // internal error (0) or a bug (2nd call failed) in ucol_getSortKey
src\libraries\System.Private.CoreLib\src\System\IO\RandomAccess.Unix.cs (4)
36result = Interop.Sys.PRead(handle, bufPtr, buffer.Length, fileOffset);
47result = Interop.Sys.Read(handle, bufPtr, buffer.Length);
53result = Interop.Sys.Read(handle, bufPtr, buffer.Length);
194bytesWritten = Interop.Sys.PWriteV(handle, pinnedVectors, left.Length, fileOffset);
src\libraries\System.Private.CoreLib\src\System\Text\ASCIIEncoding.cs (8)
321return GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length);
331int written = GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length, throwForDestinationOverflow: false);
393int numElementsToConvert = Math.Min(chars.Length, bytes.Length);
423return originalBytesLength - bytes.Length; // total number of bytes written
612return GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length);
622int written = GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length, throwForDestinationOverflow: false);
681int numElementsToConvert = Math.Min(bytes.Length, chars.Length);
711return originalCharsLength - chars.Length; // total number of chars written
src\libraries\System.Private.CoreLib\src\System\Text\Decoder.cs (2)
201return GetChars(bytesPtr, bytes.Length, charsPtr, chars.Length, flush);
307Convert(bytesPtr, bytes.Length, charsPtr, chars.Length, flush, out bytesUsed, out charsUsed, out completed);
src\libraries\System.Private.CoreLib\src\System\Text\Encoder.cs (2)
198return GetBytes(charsPtr, chars.Length, bytesPtr, bytes.Length, flush);
306Convert(charsPtr, chars.Length, bytesPtr, bytes.Length, flush, out charsUsed, out bytesUsed, out completed);
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Encoding.cs (5)
233return GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length);
243int written = GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length, throwForDestinationOverflow: false);
528return GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length);
535if (bytes.Length <= chars.Length)
540charsWritten = GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length);
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (11)
66outputBytesRemaining: destination.Length,
95if (destination.Length <= 2)
157outputCharsRemaining: destination.Length,
252outputCharsRemaining: destination.Length,
289if (destination.Length < bytesConsumedJustNow)
374_success = shouldAppend = destination.Length >= literalLength; // UTF8 encoding never produces fewer bytes than input characters
390_success = shouldAppend = destination.Length >= literalLength; // UTF8 encoding never produces fewer bytes than input characters
408ref MemoryMarshal.GetReference(dest), dest.Length);
679GrowAndAppendFormatted(ref this, value, utf16.Length, out charsWritten, format);
726GrowAndAppendFormatted(ref this, value, utf16.Length, out charsWritten, format);
783if (paddingNeeded <= _destination.Length - _pos)
src\libraries\System.Private.CoreLib\src\System\Text\UTF8Encoding.cs (5)
368return GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length);
378int written = GetBytesCommon(charsPtr, chars.Length, bytesPtr, bytes.Length, throwForDestinationOverflow: false);
563return GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length);
573int written = GetCharsCommon(bytesPtr, bytes.Length, charsPtr, chars.Length, throwForDestinationOverflow: false);
661return originalCharsLength - chars.Length; // total number of chars written
System.Private.CoreLib.Generators (14)
System.Private.DataContractSerialization (12)
System.Private.Uri (34)
System.Private.Windows.Core (56)
System.Private.Xml (24)
System.Reflection.Metadata (20)
System.Runtime.Numerics (259)
System\Numerics\BigIntegerCalculator.DivRem.cs (64)
37Debug.Assert(quotient.Length == left.Length);
73Debug.Assert(quotient.Length == left.Length - right.Length + 1);
74Debug.Assert(remainder.Length == left.Length);
94Debug.Assert(quotient.Length == left.Length - right.Length + 1);
126Debug.Assert(remainder.Length == left.Length);
161Debug.Assert(left.Length >= 1);
163Debug.Assert(left.Length >= right.Length);
164Debug.Assert(quotient.Length == left.Length - right.Length + 1
165|| quotient.Length == 0);
168if (right.Length < DivideBurnikelZieglerThreshold || left.Length - right.Length < DivideBurnikelZieglerThreshold)
178Span<uint> leftCopy = (left.Length <= StackAllocThreshold ?
180: leftCopyFromPool = ArrayPool<uint>.Shared.Rent(left.Length)).Slice(0, left.Length);
186if (quotient.Length == 0)
188int quotientLength = left.Length - right.Length + 1;
210Debug.Assert(left.Length >= 1);
212Debug.Assert(left.Length >= right.Length);
214quotient.Length == 0
215|| quotient.Length == left.Length - right.Length + 1
216|| (CompareActual(left.Slice(left.Length - right.Length), right) < 0 && quotient.Length == left.Length - right.Length));
241for (int i = left.Length; i >= right.Length; i--)
244uint t = (uint)i < (uint)left.Length ? left[i] : 0;
285if ((uint)n < (uint)quotient.Length)
288if ((uint)i < (uint)left.Length)
295Debug.Assert(left.Length >= right.Length);
314Debug.Assert(left.Length >= right.Length);
360Debug.Assert(quotient.Length == left.Length - right.Length + 1);
361Debug.Assert(remainder.Length == left.Length
362|| remainder.Length == 0);
406Debug.Assert(src.Length + sigmaDigit <= bits.Length);
419for (int i = 0; i < bits.Length; i++)
434int t = Math.Max(2, (a.Length + n - 1) / n); // Max(2, Ceil(a.Length/n))
435Debug.Assert(t < a.Length || (t == a.Length && (int)a[^1] >= 0));
447z.Slice(a.Length - (t - 2) * n).Clear();
450if (quotientUpper.Length < n)
459Debug.Assert(!q.Slice(quotientUpper.Length).ContainsAnyExcept(0u));
460q.Slice(0, quotientUpper.Length).CopyTo(quotientUpper);
487if (remainder.Length != 0)
490remainder.Slice(rt.Length).Clear();
500for (int i = rt.Length - 1; i >= 0; i--)
525Debug.Assert(quotient.Length == right.Length);
526Debug.Assert(remainder.Length >= right.Length + 1);
542if (quotient.Length < left.Length)
544Debug.Assert(quotient.Length + 1 == left.Length);
548Divide(left.Slice(0, quotient.Length), right[0], quotient, ref carry);
557if (remainder.Length != 0)
571int quotientLength = Math.Min(left.Length - right.Length + 1, quotient.Length);
576if (r1.Length < remainder.Length)
578remainder.Slice(r1.Length).Clear();
583Debug.Assert(!r1.Slice(remainder.Length).ContainsAnyExcept(0u));
584r1.Slice(0, remainder.Length).CopyTo(remainder);
597Debug.Assert(quotient.Length == right.Length);
598Debug.Assert(remainder.Length >= right.Length + 1);
627Debug.Assert(2 * quotient.Length == right.Length);
628Debug.Assert(remainder.Length >= right.Length + 1);
666Span<uint> rr = remainder.Slice(0, d.Length + 1);
673Debug.Assert((uint)qi < (uint)quotient.Length);
685Debug.Assert(bits.Length == left.Length + right.Length);
System.Security.Cryptography (323)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.cs (5)
84destination.Length);
89return EvpDigestFinalXOF(ctx, destination, (uint)destination.Length);
94return EvpDigestCurrentXOF(ctx, destination, (uint)destination.Length);
99return EvpDigestXOFOneShot(type, source, source.Length, destination, (uint)destination.Length);
104int ret = EvpDigestSqueeze(ctx, destination, (uint)destination.Length, out bool haveFeature);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Kem.cs (3)
154int ret = CryptoNative_EvpKemDecapsulate(key, GetExtraHandle(key), ciphertext, ciphertext.Length, sharedSecret, sharedSecret.Length);
184int ret = CryptoNative_EvpKemEncapsulate(key, GetExtraHandle(key), ciphertext, ciphertext.Length, sharedSecret, sharedSecret.Length);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.EcDsa.cs (1)
34destination.Length);
src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (22)
125int k = destination.Length;
134Span<byte> mInEM = destination.Slice(destination.Length - source.Length);
135Span<byte> ps = destination.Slice(2, destination.Length - source.Length - 3);
138destination[ps.Length + 2] = 0;
157int spaceRemain = destination.Length - len;
161len = Choose(spaceRemainSign, destination.Length, len);
271if (destination.Length - 11 < tLen)
277int paddingLength = destination.Length - tLen - 3;
303int maxInput = checked(destination.Length - hLen - hLen - 2);
325Span<byte> mDest = db.Slice(db.Length - source.Length);
326Span<byte> ps = db.Slice(hLen, db.Length - hLen - 1 - mDest.Length);
327Span<byte> psEnd = db.Slice(hLen + ps.Length, 1);
349dbMask = CryptoPool.Rent(db.Length);
350dbMaskSpan = new Span<byte>(dbMask, 0, db.Length);
410destination.Slice(0, destination.Length - emLen).Clear();
413Span<byte> em = destination.Slice(destination.Length - emLen, emLen);
557ReadOnlySpan<byte> salt = dbMask.Slice(dbMask.Length - sLen);
595while (writePtr.Length > 0)
601if (writePtr.Length >= hLen)
624tmp.Slice(0, writePtr.Length).CopyTo(writePtr);
637if (a.Length != b.Length)
System\Security\Cryptography\RandomNumberGenerator.cs (22)
59byte[] array = ArrayPool<byte>.Shared.Rent(data.Length);
62GetBytes(array, 0, data.Length);
63new ReadOnlySpan<byte>(array, 0, data.Length).CopyTo(data);
67Array.Clear(array, 0, data.Length);
82byte[] array = ArrayPool<byte>.Shared.Rent(data.Length);
89new ReadOnlySpan<byte>(array, 0, data.Length).CopyTo(data);
93Array.Clear(array, 0, data.Length);
291int n = values.Length;
318int needed = (destination.Length + 1) >>> 1;
323if (destination.Length % 2 != 0)
335needed = destination.Length / 2;
344destination = destination.Slice(remainingRandom.Length * 2);
373if (destination.Length < randomBytes.Length)
375randomBytes = randomBytes.Slice(0, destination.Length);
380for (int i = 0; i < randomBytes.Length; i++)
385destination = destination.Slice(randomBytes.Length);
401if (destination.Length * 2 < randomBytes.Length)
403randomBytes = randomBytes.Slice(0, destination.Length * 2);
411if ((uint)i >= (uint)destination.Length)
431for (int i = 0; i < destination.Length; i++)
System.Security.Cryptography.Cose (4)
System.Security.Cryptography.Pkcs (43)
System.Security.Cryptography.ProtectedData (2)
System.Security.Cryptography.Xml (3)
System.ServiceModel.NetFramingBase (2)
System.Text.Encoding.CodePages (1)
System.Text.Encodings.Web (59)
System.Text.Json (46)
System.Text.Json.SourceGeneration (18)
System.Text.RegularExpressions (47)
System.Text.RegularExpressions.Generator (40)
System.Web.HttpUtility (19)
System.Windows.Forms (16)
System.Windows.Forms.Design (3)
System.Windows.Forms.Primitives (3)
System.Windows.Forms.Primitives.Tests (1)
System.Windows.Forms.Tests (8)