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