93 references to Rent
System.Security.Cryptography (93)
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\Interop.BCryptExportKey.cs (2)
35
byte[] rented = CryptoPool.
Rent
(numBytesNeeded);
91
byte[] rented = CryptoPool.
Rent
(numBytesNeeded);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CngHelpers.cs (1)
156
byte[] buffer = CryptoPool.
Rent
(numBytesNeeded);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CngPkcs8.cs (5)
141
byte[] tmp = CryptoPool.
Rent
(pkcs8Writer.GetEncodedLength());
295
byte[] rented = CryptoPool.
Rent
(key.KeySize);
313
rented = CryptoPool.
Rent
(checked(size * 2));
337
byte[] rented = CryptoPool.
Rent
(key.KeySize);
350
rented = CryptoPool.
Rent
(checked(size * 2));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (2)
1885
byte[] buffer = CryptoPool.
Rent
(size);
1893
buffer = CryptoPool.
Rent
(size);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (1)
83
byte[] rented = CryptoPool.
Rent
(length);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (3)
148
byte[] decrypted = CryptoPool.
Rent
(epki.EncryptedData.Length);
234
byte[] encryptedRent = CryptoPool.
Rent
(
380
byte[] decrypted = CryptoPool.
Rent
(epki.EncryptedData.Length);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (4)
2049
byte[] rented = CryptoPool.
Rent
(publicKeySizeInBytes);
2148
byte[] buffer = CryptoPool.
Rent
(size);
2156
buffer = CryptoPool.
Rent
(size);
2213
byte[] rent = CryptoPool.
Rent
(privateKeySize);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaImplementation.cs (1)
33
byte[] rented = CryptoPool.
Rent
(alg.PrivateKeySizeInBytes);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaPkcs8.cs (2)
32
rented = CryptoPool.
Rent
(seedSize);
41
rented = CryptoPool.
Rent
(privateKeySize);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (6)
1638
byte[] encapsulationKeyBuffer = CryptoPool.
Rent
(encapsulationKeySize);
1727
byte[] rent = CryptoPool.
Rent
(decapsulationKeySize);
1772
byte[] rented = CryptoPool.
Rent
(initialSize);
1778
rented = CryptoPool.
Rent
(rented.Length * 2);
1802
byte[] buffer = CryptoPool.
Rent
(size); // Only passed out as span, callees can't keep a reference to it
1810
buffer = CryptoPool.
Rent
(size);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.Windows.cs (1)
262
byte[] buffer = CryptoPool.
Rent
(bufferSize);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.cs (1)
22
byte[] rented = CryptoPool.
Rent
(alg.DecapsulationKeySizeInBytes);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (2)
32
rented = CryptoPool.
Rent
(seedSize);
41
rented = CryptoPool.
Rent
(decapsulationKeySize);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (5)
215
rented = CryptoPool.
Rent
(byteCount);
353
byte[] sourceRent = CryptoPool.
Rent
(sourceLength);
500
rented = CryptoPool.
Rent
(byteCount);
966
byte[] rentedEncryptedData = CryptoPool.
Rent
(encryptedData.Length);
967
byte[] rentedDestination = CryptoPool.
Rent
(destination.Length);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PemKeyHelpers.Factory.cs (2)
71
byte[] decodeBuffer = CryptoPool.
Rent
(base64size);
136
byte[] decodeBuffer = CryptoPool.
Rent
(base64size);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (2)
180
rentedAuthSafe = CryptoPool.
Rent
(contentsWriter.GetEncodedLength());
192
rentedMac = CryptoPool.
Rent
(macKey.Length);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (1)
432
byte[] encryptedRent = CryptoPool.
Rent
(contentsWriter.GetEncodedLength() + cipherBlockBytes);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (1)
154
IRented = CryptoPool.
Rent
(ILen);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\PqcBlobHelpers.cs (2)
122
: (rented = CryptoPool.
Rent
(blobSize));
243
(rented = CryptoPool.
Rent
(blobSize));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSACng.EncryptDecrypt.cs (2)
60
byte[] rented = CryptoPool.
Rent
(modulusSizeInBytes);
142
byte[] rented = CryptoPool.
Rent
(modulusSizeInBytes);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RSAKeyFormatHelper.cs (1)
108
byte[] rented = CryptoPool.
Rent
(pkcs1PublicKey.GetEncodedLength());
src\runtime\src\libraries\Common\src\System\Security\Cryptography\RsaPaddingProcessor.cs (3)
349
dbMask = CryptoPool.
Rent
(db.Length);
421
byte[] dbMaskRented = CryptoPool.
Rent
(dbLen);
519
byte[] dbMaskRented = CryptoPool.
Rent
(maskedDb.Length);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (2)
1957
byte[] buffer = CryptoPool.
Rent
(size);
1965
buffer = CryptoPool.
Rent
(size);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Utf8DataEncoding.cs (1)
20
(_rented = CryptoPool.
Rent
(maxLength));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (1)
650
byte[] rented = CryptoPool.
Rent
(totalLength);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (3)
975
_decryptBuffer = CryptoPool.
Rent
(upperBound);
1098
_keyDecryptBuffer = CryptoPool.
Rent
(spaceRequired);
1317
byte[] ret = CryptoPool.
Rent
(writer.GetEncodedLength());
System\Security\Cryptography\AsymmetricAlgorithm.cs (2)
788
byte[] buf = CryptoPool.
Rent
(bufSize);
818
byte[] buf = CryptoPool.
Rent
(bufSize);
System\Security\Cryptography\Base64Transforms.cs (2)
158
transformBuffer = transformBufferArray = CryptoPool.
Rent
(bytesToTransform);
205
transformBuffer = transformBufferArray = CryptoPool.
Rent
(bytesToTransform);
System\Security\Cryptography\BasicSymmetricCipherLiteBCrypt.cs (1)
56
byte[] rented = CryptoPool.
Rent
(output.Length);
System\Security\Cryptography\BasicSymmetricCipherLiteNCrypt.cs (1)
66
byte[] rented = CryptoPool.
Rent
(output.Length);
System\Security\Cryptography\CngHelpers.cs (1)
185
byte[] rsaBlob = CryptoPool.
Rent
(blobSize);
System\Security\Cryptography\EccKeyFormatHelper.cs (2)
756
basePointBytes = rented = CryptoPool.
Rent
(basePointLength);
784
publicKeyBytes = rented = CryptoPool.
Rent
(publicKeyLength);
System\Security\Cryptography\Helpers.cs (1)
538
? (rented = CryptoPool.
Rent
(messageLength))
System\Security\Cryptography\HKDF.Windows.cs (1)
133
rented = CryptoPool.
Rent
(info.Length);
System\Security\Cryptography\HKDFManagedImplementation.cs (1)
36
rentedTempInfoBuffer = CryptoPool.
Rent
(info.Length);
System\Security\Cryptography\LiteHashProvider.cs (2)
116
byte[] rented = CryptoPool.
Rent
(4096);
147
byte[] rented = CryptoPool.
Rent
(4096);
System\Security\Cryptography\LiteHashProvider.Xof.cs (1)
132
byte[] rented = CryptoPool.
Rent
(4096);
System\Security\Cryptography\PemKeyHelpers.cs (4)
32
byte[] buffer = CryptoPool.
Rent
(bufferSize);
68
byte[] buffer = CryptoPool.
Rent
(bufferSize);
137
byte[] decodeBuffer = CryptoPool.
Rent
(base64size);
223
byte[] decodeBuffer = CryptoPool.
Rent
(base64size);
System\Security\Cryptography\Rfc2898DeriveBytes.OneShot.cs (1)
282
(rentedPasswordBuffer = CryptoPool.
Rent
(maxEncodedSize)) :
System\Security\Cryptography\RSA.cs (3)
684
byte[] hash = CryptoPool.
Rent
(i);
734
byte[] rented = CryptoPool.
Rent
(rentSize);
777
byte[] rented = CryptoPool.
Rent
(rentSize);
System\Security\Cryptography\UniversalCryptoDecryptor.cs (3)
89
rentedCiphertext = CryptoPool.
Rent
(inputBuffer.Length);
96
rentedCiphertext = CryptoPool.
Rent
(rentedCiphertextSize);
137
byte[] rented = CryptoPool.
Rent
(inputCount + InputBlockSize);
System\Security\Cryptography\UniversalCryptoOneShot.cs (1)
167
byte[] rentedBuffer = CryptoPool.
Rent
(input.Length);
System\Security\Cryptography\X25519DiffieHellman.cs (4)
1459
byte[] buffer = CryptoPool.
Rent
(size);
1467
buffer = CryptoPool.
Rent
(size);
1525
byte[] rented = CryptoPool.
Rent
(initialSize);
1531
rented = CryptoPool.
Rent
(rented.Length * 2);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (2)
1114
newSerialNumber = CryptoPool.
Rent
(serialNumber.Length + 1);
1128
newSerialNumber = CryptoPool.
Rent
(contentLength);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (3)
1533
byte[] certBytes = CryptoPool.
Rent
(fields.DecodedDataLength);
2010
byte[] base64Buffer = CryptoPool.
Rent
(fields.DecodedDataLength);
2102
byte[] base64Buffer = CryptoPool.
Rent
(fields.DecodedDataLength);