172 references to Clear
CodeGenerator (1)
HttpUtilities\CombinationsWithoutRepetition.cs (1)
91Array.Clear(Current, 0, Current.Length);
dotnet-dev-certs (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
IISExpress.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\ClientCertificateFixture.cs (1)
57Array.Clear(export, 0, export.Length);
Microsoft.AspNetCore.Components (2)
src\Components\Shared\src\ArrayBuilder.cs (1)
196Array.Clear(_items, 0, _itemsInUse);
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
406Array.Clear(_arrayStorage, 0, _count);
Microsoft.AspNetCore.Components.Server (1)
src\Components\Shared\src\ArrayBuilder.cs (1)
196Array.Clear(_items, 0, _itemsInUse);
Microsoft.AspNetCore.Components.Tests (1)
Rendering\ArrayBuilderSegmentTest.cs (1)
44Array.Clear(originalBuffer, 0, originalBuffer.Length); // Extra proof that we're not using the original storage
Microsoft.AspNetCore.Components.WebView (1)
src\Components\Shared\src\ArrayBuilder.cs (1)
196Array.Clear(_items, 0, _itemsInUse);
Microsoft.AspNetCore.Cryptography.KeyDerivation (1)
PBKDF2\ManagedPbkdf2Provider.cs (1)
89Array.Clear(passwordBytes, 0, passwordBytes.Length);
Microsoft.AspNetCore.DataProtection (19)
AuthenticatedEncryption\ConfigurationModel\SecretExtensions.cs (2)
33Array.Clear(unprotectedSecretRawBytes, 0, unprotectedSecretRawBytes.Length); 59Array.Clear(unprotectedSecret, 0, unprotectedSecret.Length);
Cng\DpapiSecretSerializerHelper.cs (2)
61Array.Clear(plaintextSecret, 0, plaintextSecret.Length); 139Array.Clear(plaintextSecret, 0, plaintextSecret.Length);
Managed\AesGcmAuthenticatedEncryptor.cs (4)
134Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 135Array.Clear(derivedKey, 0, derivedKey.Length); 210Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 211Array.Clear(derivedKey, 0, derivedKey.Length);
Managed\ManagedAuthenticatedEncryptor.cs (8)
261Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 262Array.Clear(decryptionSubkey, 0, decryptionSubkey.Length); 263Array.Clear(validationSubkey, 0, validationSubkey.Length); 264Array.Clear(derivedKeysBuffer, 0, derivedKeysBuffer.Length); 361Array.Clear(decryptedKdk, 0, decryptedKdk.Length); 362Array.Clear(encryptionSubkey, 0, encryptionSubkey.Length); 363Array.Clear(validationSubkey, 0, validationSubkey.Length); 364Array.Clear(derivedKeysBuffer, 0, derivedKeysBuffer.Length);
SP800_108\ManagedSP800_108_CTR_HMACSHA512.cs (1)
49Array.Clear(prfOutput, 0, prfOutput.Length); // contains key material, so delete it
XmlEncryption\XmlEncryptionExtensions.cs (2)
176Array.Clear(underlyingBuffer, 0, underlyingBuffer.Length); 197Array.Clear(plaintextSecret, 0, plaintextSecret.Length);
Microsoft.AspNetCore.DeveloperCertificates.XPlat (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
Microsoft.AspNetCore.Http (1)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
258Array.Clear(_arrayStorage, 0, _count);
Microsoft.AspNetCore.Http.Abstractions (1)
Routing\RouteValueDictionary.cs (1)
406Array.Clear(_arrayStorage, 0, _count);
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
Buffers\MemoryPoolViewBufferScope.cs (1)
75Array.Clear(segment, 0, segment.Length);
Buffers\ViewBuffer.cs (2)
322Array.Clear(page.Buffer, 0, page.Count); 355Array.Clear(page.Buffer, 0, page.Count);
Microsoft.AspNetCore.Server.Kestrel.Core (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
258Array.Clear(_arrayStorage, 0, _count);
Microsoft.AspNetCore.SignalR.Client.Core (1)
src\SignalR\common\Shared\MessageBuffer.cs (1)
418Array.Clear(_messages, 0, BufferLength);
Microsoft.AspNetCore.SignalR.Common.Tests (2)
Internal\Protocol\MemoryBufferWriterTests.cs (2)
304Array.Clear(data, 0, data.Length); 351Array.Clear(data, 0, data.Length);
Microsoft.AspNetCore.SignalR.Core (1)
src\SignalR\common\Shared\MessageBuffer.cs (1)
418Array.Clear(_messages, 0, BufferLength);
Microsoft.Build (2)
Collections\RetrievableEntryHashSet\HashSet.cs (2)
270Array.Clear(_slots, 0, _lastIndex); 271Array.Clear(_buckets, 0, _buckets.Length);
Microsoft.Build.Framework (1)
SegmentedArray.cs (1)
16/// <seealso cref="Array.Clear(Array, int, int)"/>
Microsoft.JSInterop (1)
src\Components\Shared\src\ArrayBuilder.cs (1)
196Array.Clear(_items, 0, _itemsInUse);
MonoTargetsTasks (1)
ILStrip\ILStrip.cs (1)
345Array.Clear(zeroBuffer, 0, zeroBuffer.Length);
PresentationBuildTasks (1)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\KnownTypesHelper.cs (1)
74Array.Clear(_typeTable, 0, _typeTable.Length);
PresentationCore (2)
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
405Array.Clear(glyphBits, 0, glyphBitsLength);
MS\Internal\Shaping\OpenTypeLayout.cs (1)
1221Array.Clear(_lookupUsageFlags, 0, requiredLookupUsageArraySize);
PresentationFramework (6)
MS\Internal\Printing\PrintDlgExMarshaler.cs (1)
764Array.Clear(nulls, 0, nulls.Length);
System\Windows\Controls\Grid.cs (3)
396Array.Clear(_definitionIndices, 0, _definitionIndices.Length); 404Array.Clear(_roundingErrors, 0, _roundingErrors.Length); 2878Array.Clear(extData.TempDefinitions, 0, Math.Max(DefinitionsU.Length, DefinitionsV.Length));
System\Windows\Data\MultiBindingExpression.cs (2)
612Array.Clear(_tempTypes, 0, _tempTypes.Length); 1271Array.Clear(_tempValues, 0, _tempValues.Length);
ReachFramework (3)
PrintConfig\PTProvider.cs (1)
740Array.Clear(data, 0, data.Length);
Serialization\Manager\ReachSerializationUtils.cs (2)
254Array.Clear(List, 0, Count); 272Array.Clear(List, Count - 1, 1);
System.Collections (4)
System\Collections\Generic\PriorityQueue.cs (1)
561Array.Clear(_nodes, 0, _size);
System\Collections\Generic\SortedList.cs (2)
396Array.Clear(keys, 0, _size); 400Array.Clear(values, 0, _size);
System\Collections\Generic\Stack.cs (1)
75Array.Clear(_array, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references.
System.Collections.Immutable (5)
System\Collections\Frozen\FrozenHashTable.cs (1)
226Array.Clear(seenBuckets, 0, Math.Min(numBuckets, seenBuckets.Length));
System\Collections\Immutable\ImmutableArray_1.Builder.cs (2)
109Array.Clear(_elements, value, _count - value); 595Array.Clear(_elements, index, length); // Clear the elements so that the gc can reclaim the references.
System\Collections\Immutable\ImmutableExtensions.cs (2)
65/// avoids a call into the runtime's implementation of <see cref="Array.Clear(Array, int, int)"/>, helping performance, 67/// <see cref="Stack{T}.Clear"/> and <see cref="Array.Clear(Array, int, int)"/> typically don't.
System.Collections.NonGeneric (6)
System\Collections\Queue.cs (3)
110Array.Clear(_array, _head, _size); 113Array.Clear(_array, _head, _array.Length - _head); 114Array.Clear(_array, 0, _tail);
System\Collections\SortedList.cs (2)
286Array.Clear(keys, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references. 287Array.Clear(values, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references.
System\Collections\Stack.cs (1)
80Array.Clear(_array, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references.
System.Formats.Asn1 (3)
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (1)
33Array.Clear(array, 0, clearSize);
System\Formats\Asn1\AsnDecoder.Oid.cs (1)
143Array.Clear(tmpBytes, 0, tmpBytes.Length);
System\Formats\Asn1\AsnWriter.cs (1)
84Array.Clear(_buffer, 0, _offset);
System.Formats.Cbor (1)
System\Formats\Cbor\Writer\CborWriter.cs (1)
108Array.Clear(_buffer, 0, _offset);
System.Formats.Tar (2)
System\Formats\Tar\TarHeader.Write.cs (1)
816Array.Clear(buffer, 0, paddingAfterData);
System\Formats\Tar\TarWriter.cs (1)
361Array.Clear(twoEmptyRecords, 0, TwoRecordSize);
System.Linq (1)
System\Linq\SegmentedArrayBuilder.cs (1)
78Array.Clear(currentSegment, 0, _countInCurrentSegment);
System.Linq.Expressions (1)
System\Runtime\CompilerServices\ReadOnlyCollectionBuilder.cs (1)
207Array.Clear(_items, 0, _size);
System.Net.Http (1)
System\Net\Http\Headers\HttpHeaders.cs (1)
1495Array.Clear(entries, 0, _count);
System.Private.CoreLib (14)
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (1)
216Array.Clear(_items, 0, _size); // Don't need to doc this but we clear the elements so that the gc can reclaim the references.
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs (1)
293Array.Clear(_entries, 0, count);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\HashSet.cs (1)
206Array.Clear(_entries, 0, count);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (3)
329Array.Clear(_items, 0, size); // Clear the elements so that the gc can reclaim the references. 990Array.Clear(_items, freeIndex, _size - freeIndex); // Clear the elements so that the gc can reclaim the references. 1046Array.Clear(_items, _size, count);
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (3)
76Array.Clear(_array, _head, _size); 80Array.Clear(_array, _head, _array.Length - _head); 81Array.Clear(_array, 0, _tail);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (4)
562Array.Clear(_buffer, _length, newLength - _length); 602Array.Clear(_buffer, _length, i - _length); 653Array.Clear(_buffer, _length, i - _length); 735Array.Clear(_buffer, _length, _position - _length);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CollectionsMarshal.cs (1)
100Array.Clear(list._items, count, list._size - count);
System.Private.Xml (2)
System\Xml\BinaryXml\XmlBinaryReader.cs (2)
1962Array.Clear(_symbolTables.symtable, 1, _symbolTables.symtable.Length - 1); 2736Array.Clear(_attrHashTbl, 0, tblSize);
System.Security.Cryptography (7)
System\Security\Cryptography\DSA.cs (1)
909Array.Clear(array, 0, data.Length);
System\Security\Cryptography\ECDsa.cs (2)
1032Array.Clear(array, 0, data.Length); 1229Array.Clear(array, 0, data.Length);
System\Security\Cryptography\HashAlgorithm.cs (1)
257Array.Clear(array, 0, source.Length);
System\Security\Cryptography\RandomNumberGenerator.cs (2)
67Array.Clear(array, 0, data.Length); 93Array.Clear(array, 0, data.Length);
System\Security\Cryptography\RSA.cs (1)
326Array.Clear(array, 0, data.Length);
System.Threading.Tasks.Dataflow (2)
Blocks\BatchBlock.cs (2)
800Array.Clear(postponedTemp, 0, postponedTemp.Length); // clear out the temp array so as not to hold onto messages too long 914Array.Clear(postponedTemp, 0, postponedTemp.Length); // clear out the temp array so as not to hold onto messages too long
Templates.Blazor.Tests (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
Templates.Blazor.WebAssembly.Auth.Tests (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
Templates.Blazor.WebAssembly.Tests (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
Templates.Mvc.Tests (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);
Templates.Tests (8)
src\Shared\CertificateGeneration\CertificateManager.cs (6)
511Array.Clear(keyBytes, 0, keyBytes.Length); 512Array.Clear(pem, 0, pem.Length); 518Array.Clear(keyBytes, 0, keyBytes.Length); 519Array.Clear(pem, 0, pem.Length); 569Array.Clear(bytes, 0, bytes.Length); 597Array.Clear(pemEnvelope, 0, pemEnvelope.Length);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (1)
28Array.Clear(export, 0, export.Length);
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (1)
59Array.Clear(export, 0, export.Length);