78 references to Return
System.Security.Cryptography (78)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Encode.cs (1)
72CryptoPool.Return(data);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.PooledCrypto.cs (1)
32CryptoPool.Return(bytes);
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (2)
1891CryptoPool.Return(buffer); 1909CryptoPool.Return(buffer, written);
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (2)
20Return(arraySegment.Array, clearSize == ClearAll ? arraySegment.Count : clearSize); 64CryptoPool.Return(_rented, clearSize);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
154CryptoPool.Return(decrypted, clearSize: 0); 247CryptoPool.Return(encryptedRent, clearSize: 0); 378CryptoPool.Return(decrypted);
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (4)
2113CryptoPool.Return(rented, clearSize: 0); 2188CryptoPool.Return(buffer); 2206CryptoPool.Return(buffer, written); 2270CryptoPool.Return(rent, privateKeySize);
src\libraries\Common\src\System\Security\Cryptography\MLDsaImplementation.cs (1)
50CryptoPool.Return(rented);
src\libraries\Common\src\System\Security\Cryptography\MLDsaPkcs8.cs (1)
68CryptoPool.Return(rented, written);
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (6)
1695CryptoPool.Return(encapsulationKeyBuffer, clearSize: 0); // SPKI is public info, skip clear. 1782CryptoPool.Return(rent, decapsulationKeySize); 1809CryptoPool.Return(rented, 0); 1823CryptoPool.Return(rented, written); 1839CryptoPool.Return(buffer); 1852CryptoPool.Return(buffer, written);
src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.cs (1)
41CryptoPool.Return(rented, size);
src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (1)
68CryptoPool.Return(rented, written);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (5)
223CryptoPool.Return(rented, clearSize: 0); 443CryptoPool.Return(sourceRent, sourceLength); 504CryptoPool.Return(rented, buf.Length); 971CryptoPool.Return(rentedEncryptedData, encryptedData.Length); 972CryptoPool.Return(rentedDestination, destination.Length);
src\libraries\Common\src\System\Security\Cryptography\PemKeyHelpers.Factory.cs (2)
91CryptoPool.Return(decodeBuffer, clearSize: bytesWritten); 156CryptoPool.Return(decodeBuffer, clearSize: bytesWritten);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (2)
293CryptoPool.Return(rentedMac, clearSize: 0); 299CryptoPool.Return(rentedAuthSafe, clearSize: 0);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (1)
426CryptoPool.Return(encryptedRent, clearSize: 0);
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
229CryptoPool.Return(IRented, clearSize: 0);
src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (1)
156CryptoPool.Return(rented, clearSize: 0);
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (2)
103CryptoPool.Return(buf, clearSize: 0); 157CryptoPool.Return(rent, clearSize: 0);
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\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (2)
1963CryptoPool.Return(buffer); 1981CryptoPool.Return(buffer, written);
src\libraries\Common\src\System\Security\Cryptography\Utf8DataEncoding.cs (1)
34CryptoPool.Return(_rented, clearSize: 0);
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (1)
578CryptoPool.Return(rented, length);
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
936CryptoPool.Return(_decryptBuffer, _decryptBufferOffset); 941CryptoPool.Return(_keyDecryptBuffer, _keyDecryptBufferOffset);
System\Security\Cryptography\AsymmetricAlgorithm.cs (2)
804CryptoPool.Return(buf, bytesWritten); 834CryptoPool.Return(buf, bytesWritten);
System\Security\Cryptography\Base64Transforms.cs (1)
321CryptoPool.Return(array, clearSize);
System\Security\Cryptography\EccKeyFormatHelper.cs (2)
789CryptoPool.Return(rented, clearSize: 0); 817CryptoPool.Return(rented, clearSize: 0);
System\Security\Cryptography\Helpers.cs (1)
566CryptoPool.Return(rented);
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\OpenSslCipherLite.cs (2)
80CryptoPool.Return(rented, clearSize: written); 118CryptoPool.Return(tmp, written);
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\X509Certificates\OpenSslCrlCache.cs (1)
377CryptoPool.Return(crlDistributionPoints.Array, clearSize: 0);
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (4)
258CryptoPool.Return(authorityInformationAccess.Array!, clearSize: 0); 329CryptoPool.Return(tempChainRent); 786CryptoPool.Return(encoded.Array!, clearSize: 0); 1214CryptoPool.Return(authorityInformationAccess.Array!, clearSize: 0);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
1586CryptoPool.Return(certBytes, clearSize: 0);
System\Security\Cryptography\X509Certificates\X509CertificateLoader.Unix.cs (3)
176CryptoPool.Return(rented, length); 517CryptoPool.Return(buf); 606CryptoPool.Return(rented, _clearSize);