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