49 references to CryptoPool
System.Security.Cryptography.Pkcs (49)
Internal\Cryptography\Pal\AnyOS\ManagedPal.KeyTrans.cs (2)
199cek = CryptoPool.Rent(privateKey.KeySize / 8); 220CryptoPool.Return(cek, cekLength);
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (1)
253byte[] rented = CryptoPool.Rent(writer.GetEncodedLength());
src\libraries\Common\src\System\Security\Cryptography\CryptoPool.cs (2)
64CryptoPool.Return(_rented, clearSize); 83byte[] rented = CryptoPool.Rent(length);
src\libraries\Common\src\System\Security\Cryptography\KeyFormatHelper.Encrypted.cs (10)
118byte[] decrypted = CryptoPool.Rent(epki.EncryptedData.Length); 154CryptoPool.Return(decrypted, clearSize: 0); 203byte[] encryptedRent = CryptoPool.Rent( 247CryptoPool.Return(encryptedRent, clearSize: 0); 302CryptoPool.Return(decrypted); 333CryptoPool.Return(decrypted); 361byte[] decrypted = CryptoPool.Rent(epki.EncryptedData.Length); 378CryptoPool.Return(decrypted); 415CryptoPool.Return(decrypted); 451CryptoPool.Return(decrypted);
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (10)
188rented = CryptoPool.Rent(byteCount); 223CryptoPool.Return(rented, clearSize: 0); 326byte[] sourceRent = CryptoPool.Rent(sourceLength); 443CryptoPool.Return(sourceRent, sourceLength); 473rented = CryptoPool.Rent(byteCount); 504CryptoPool.Return(rented, buf.Length); 925byte[] rentedEncryptedData = CryptoPool.Rent(encryptedData.Length); 926byte[] rentedDestination = CryptoPool.Rent(destination.Length); 971CryptoPool.Return(rentedEncryptedData, encryptedData.Length); 972CryptoPool.Return(rentedDestination, destination.Length);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (4)
180rentedAuthSafe = CryptoPool.Rent(contentsWriter.GetEncodedLength()); 192rentedMac = CryptoPool.Rent(macKey.Length); 293CryptoPool.Return(rentedMac, clearSize: 0); 299CryptoPool.Return(rentedAuthSafe, clearSize: 0);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (2)
371byte[] encryptedRent = CryptoPool.Rent(contentsWriter.GetEncodedLength() + cipherBlockBytes); 426CryptoPool.Return(encryptedRent, clearSize: 0);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (2)
200CryptoPool.Return(decrypted); 231CryptoPool.Return(decrypted);
src\libraries\Common\src\System\Security\Cryptography\Pkcs12Kdf.cs (2)
154IRented = CryptoPool.Rent(ILen); 229CryptoPool.Return(IRented, clearSize: 0);
System\Security\Cryptography\Pkcs\CmsSignature.DSA.cs (4)
80byte[] rented = CryptoPool.Rent(bufSize); 98CryptoPool.Return(rented, bufSize); 151byte[] rented = CryptoPool.Rent(dsa.KeySize / 8); 179CryptoPool.Return(rented, bytesWritten);
System\Security\Cryptography\Pkcs\CmsSignature.ECDsa.cs (4)
85byte[] rented = CryptoPool.Rent(bufSize); 103CryptoPool.Return(rented, bufSize); 166byte[] rented = CryptoPool.Rent(bufSize); 194CryptoPool.Return(rented, bytesWritten);
System\Security\Cryptography\Pkcs\SignedCms.cs (2)
266rented = CryptoPool.Rent(wrappedContent.Length); 287CryptoPool.Return(rented, bytesWritten);
System\Security\Cryptography\Pkcs\SignerInfo.cs (4)
674: (rented = CryptoPool.Rent(encodedLength)); 687CryptoPool.Return(rented); 791byte[] rented = CryptoPool.Rent(contentToVerifyLength); 800CryptoPool.Return(rented);