2 instantiations of CryptoPoolLease
System.Security.Cryptography (2)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (2)
85
return new
CryptoPoolLease
118
return new
CryptoPoolLease
45 references to CryptoPoolLease
System.Security.Cryptography (45)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (8)
159
using (
CryptoPoolLease
lease =
CryptoPoolLease
.Rent(Algorithm.MaxSignatureSizeInBytes, skipClear: true))
1593
using (
CryptoPoolLease
lease =
CryptoPoolLease
.RentConditionally(Algorithm.MaxPublicKeySizeInBytes, destination, skipClear: true))
1718
using (
CryptoPoolLease
lease =
CryptoPoolLease
.RentConditionally(Algorithm.MaxPrivateKeySizeInBytes, destination, skipClearIfNotRented: true))
1814
using (
CryptoPoolLease
lease =
CryptoPoolLease
.Rent(Algorithm.MaxPrivateKeySizeInBytes))
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLKem.cs (9)
1896
using (
CryptoPoolLease
lease =
CryptoPoolLease
.RentConditionally(Algorithm.MaxEncapsulationKeySizeInBytes, destination, skipClear: true))
2041
using (
CryptoPoolLease
lease =
CryptoPoolLease
.RentConditionally(Algorithm.MaxDecapsulationKeySizeInBytes, destination, skipClearIfNotRented: true))
2119
using (
CryptoPoolLease
lease =
CryptoPoolLease
.Rent(Algorithm.MaxDecapsulationKeySizeInBytes))
2241
CryptoPoolLease
lease =
CryptoPoolLease
.Rent(size);
2254
lease =
CryptoPoolLease
.Rent(size);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (3)
81
internal static
CryptoPoolLease
Rent(int length, bool skipClear = false)
93
internal static
CryptoPoolLease
RentConditionally(
107
internal static
CryptoPoolLease
RentConditionally(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellmanCng.Windows.cs (3)
82
using (
CryptoPoolLease
lease = X25519WindowsHelpers.CreateCngBlob(reducedPublicKey, privateKey: false, out _))
205
using (
CryptoPoolLease
lease =
CryptoPoolLease
.Rent(numBytesNeeded, skipClear: !privateKey))
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellmanImplementation.Windows.cs (1)
272
using (
CryptoPoolLease
lease = X25519WindowsHelpers.CreateCngBlob(key, privateKey, out preservation))
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519WindowsHelpers.cs (3)
73
internal static
CryptoPoolLease
CreateCngBlob(ReadOnlySpan<byte> key, bool privateKey, out byte preservation)
89
CryptoPoolLease
lease =
CryptoPoolLease
.Rent(requiredBufferSize, skipClear: !privateKey);
System\Security\Cryptography\Aes.cs (6)
512
using (
CryptoPoolLease
lease =
CryptoPoolLease
.Rent(ciphertext.Length - 8, skipClear: true))
606
CryptoPoolLease
lease =
CryptoPoolLease
.RentConditionally(
802
using (
CryptoPoolLease
lease =
CryptoPoolLease
.Rent(len))
System\Security\Cryptography\HpkeManagedKdfAdapter.cs (2)
163
using (
CryptoPoolLease
labeledIkm =
CryptoPoolLease
.Rent(labeledIkmLength))
System\Security\Cryptography\HpkeManagedKemAdapter.cs (2)
116
using (
CryptoPoolLease
labeledIkm =
CryptoPoolLease
.Rent(labeledIkmLength))
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (8)
865
using (
CryptoPoolLease
pk1 =
CryptoPoolLease
.Rent(publicKey.Algorithm.EncapsulationKeySizeInBytes, skipClear: true))
866
using (
CryptoPoolLease
pk2 =
CryptoPoolLease
.Rent(publicKey.Algorithm.EncapsulationKeySizeInBytes, skipClear: true))
967
using (
CryptoPoolLease
pk1 =
CryptoPoolLease
.Rent(publicKey.Algorithm.PublicKeySizeInBytes, skipClear: true))
968
using (
CryptoPoolLease
pk2 =
CryptoPoolLease
.Rent(publicKey.Algorithm.PublicKeySizeInBytes, skipClear: true))