86 references to Return
System.Security.Cryptography (86)
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\Interop.BCryptExportKey.cs (2)
40CryptoPool.Return(rented); 110CryptoPool.Return(rented, clearSize: 0);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CngHelpers.cs (1)
174CryptoPool.Return(buffer, clearSize: 0);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CngPkcs8.cs (5)
150CryptoPool.Return(tmp, written); 314CryptoPool.Return(current, rentWritten); 326CryptoPool.Return(rented, rentWritten); 351CryptoPool.Return(current, rentWritten); 362CryptoPool.Return(rented, rentWritten);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (2)
1891CryptoPool.Return(buffer); 1909CryptoPool.Return(buffer, written);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (2)
20Return(arraySegment.Array, clearSize == ClearAll ? arraySegment.Count : clearSize); 64CryptoPool.Return(_rented, clearSize);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
185CryptoPool.Return(decrypted, clearSize: 0); 278CryptoPool.Return(encryptedRent, clearSize: 0); 397CryptoPool.Return(decrypted);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (4)
2078CryptoPool.Return(rented, clearSize: 0); 2154CryptoPool.Return(buffer); 2172CryptoPool.Return(buffer, written); 2236CryptoPool.Return(rent, privateKeySize);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaImplementation.cs (1)
50CryptoPool.Return(rented);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaPkcs8.cs (1)
67CryptoPool.Return(rented, written);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (6)
1665CryptoPool.Return(encapsulationKeyBuffer, clearSize: 0); // SPKI is public info, skip clear. 1750CryptoPool.Return(rent, decapsulationKeySize); 1777CryptoPool.Return(rented, 0); 1791CryptoPool.Return(rented, written); 1808CryptoPool.Return(buffer); 1821CryptoPool.Return(buffer, written);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.Windows.cs (1)
288CryptoPool.Return(buffer, clearSize: 0); // Manually cleared above.
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.cs (1)
41CryptoPool.Return(rented, size);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (1)
67CryptoPool.Return(rented, written);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (5)
250CryptoPool.Return(rented, clearSize: 0); 470CryptoPool.Return(sourceRent, sourceLength); 531CryptoPool.Return(rented, buf.Length); 1012CryptoPool.Return(rentedEncryptedData, encryptedData.Length); 1013CryptoPool.Return(rentedDestination, destination.Length);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PemKeyHelpers.Factory.cs (2)
91CryptoPool.Return(decodeBuffer, clearSize: bytesWritten); 156CryptoPool.Return(decodeBuffer, clearSize: bytesWritten);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (2)
293CryptoPool.Return(rentedMac, clearSize: 0); 299CryptoPool.Return(rentedAuthSafe, clearSize: 0);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (1)
487CryptoPool.Return(encryptedRent, clearSize: 0);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
229CryptoPool.Return(IRented, clearSize: 0);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PqcBlobHelpers.cs (2)
154CryptoPool.Return(rented, blobSize); 271CryptoPool.Return(rented, 0);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (2)
83CryptoPool.Return(rented, clearSize: 0); 165CryptoPool.Return(rented, clearSize: 0);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (1)
119CryptoPool.Return(rented, clearSize: 0);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (3)
378CryptoPool.Return(dbMask, clearSize: 0); 469CryptoPool.Return(dbMaskRented, clearSize: 0); 583CryptoPool.Return(dbMaskRented, clearSize: 0);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (2)
1963CryptoPool.Return(buffer); 1981CryptoPool.Return(buffer, written);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Utf8DataEncoding.cs (1)
34CryptoPool.Return(_rented, clearSize: 0);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (1)
578CryptoPool.Return(rented, length);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
939CryptoPool.Return(_decryptBuffer, _decryptBufferOffset); 944CryptoPool.Return(_keyDecryptBuffer, _keyDecryptBufferOffset);
System\Security\Cryptography\AsymmetricAlgorithm.cs (2)
804CryptoPool.Return(buf, bytesWritten); 834CryptoPool.Return(buf, bytesWritten);
System\Security\Cryptography\Base64Transforms.cs (1)
326CryptoPool.Return(array, clearSize);
System\Security\Cryptography\BasicSymmetricCipherLiteBCrypt.cs (1)
65CryptoPool.Return(rented, clearSize: numBytesWritten);
System\Security\Cryptography\BasicSymmetricCipherLiteNCrypt.cs (1)
75CryptoPool.Return(rented, clearSize: numBytesWritten);
System\Security\Cryptography\EccKeyFormatHelper.cs (2)
768CryptoPool.Return(rented, clearSize: 0); 796CryptoPool.Return(rented, clearSize: 0);
System\Security\Cryptography\Helpers.cs (1)
566CryptoPool.Return(rented);
System\Security\Cryptography\HKDF.Windows.cs (1)
232CryptoPool.Return(rented, clearSize: 0); // Info is not considered secret.
System\Security\Cryptography\HKDFManagedImplementation.cs (1)
81CryptoPool.Return(rentedTempInfoBuffer, clearSize: info.Length);
System\Security\Cryptography\LiteHashProvider.cs (2)
133CryptoPool.Return(rented, clearSize: maxRead); 164CryptoPool.Return(rented, clearSize: maxRead);
System\Security\Cryptography\LiteHashProvider.Xof.cs (1)
149CryptoPool.Return(rented, clearSize: maxRead);
System\Security\Cryptography\PemKeyHelpers.cs (4)
49CryptoPool.Return(buffer, bytesWritten); 85CryptoPool.Return(buffer, bytesWritten); 159CryptoPool.Return(decodeBuffer, clearSize: bytesWritten); 245CryptoPool.Return(decodeBuffer, clearSize: bytesWritten);
System\Security\Cryptography\Rfc2898DeriveBytes.OneShot.cs (1)
298CryptoPool.Return(rentedPasswordBuffer, clearSize: 0); // manually cleared above.
System\Security\Cryptography\RSA.cs (3)
694CryptoPool.Return(hash, hashLength); 753CryptoPool.Return(rented, pkcs1Size); 795CryptoPool.Return(rented, pkcs1Size);
System\Security\Cryptography\UniversalCryptoDecryptor.cs (2)
128CryptoPool.Return(rentedCiphertext, clearSize: rentedCiphertextSize); 149CryptoPool.Return(rented, clearSize: written);
System\Security\Cryptography\UniversalCryptoOneShot.cs (1)
198CryptoPool.Return(rentedBuffer, clearSize: 0); // ZeroMemory clears the part of the buffer that was written to.
System\Security\Cryptography\X25519DiffieHellman.cs (4)
1465CryptoPool.Return(buffer); 1477CryptoPool.Return(buffer, written); 1530CryptoPool.Return(rented, 0); 1544CryptoPool.Return(rented, written);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (3)
1558CryptoPool.Return(certBytes, clearSize: 0); 2048CryptoPool.Return(base64Buffer, base64ClearSize); 2131CryptoPool.Return(base64Buffer, clearSize);