Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Decrypt() [2/2]

byte[] System.Security.Cryptography.RSACryptoServiceProvider.Decrypt ( byte[] rgb,
bool fOAEP )
inline

Definition at line 206 of file RSACryptoServiceProvider.cs.

207 {
208 if (rgb == null)
209 {
210 throw new ArgumentNullException("rgb");
211 }
212 int keySize = KeySize;
213 if (rgb.Length != keySize / 8)
214 {
215 throw new CryptographicException(System.SR.Cryptography_RSA_DecryptWrongSize);
216 }
217 CapiHelper.DecryptKey(SafeKeyHandle, rgb, rgb.Length, fOAEP, out var decryptedData);
218 return decryptedData;
219 }
static void DecryptKey(SafeKeyHandle safeKeyHandle, byte[] encryptedData, int encryptedDataLength, bool fOAEP, out byte[] decryptedData)
static string Cryptography_RSA_DecryptWrongSize
Definition SR.cs:138
Definition SR.cs:7

References System.SR.Cryptography_RSA_DecryptWrongSize, Internal.NativeCrypto.CapiHelper.DecryptKey(), and System.Security.Cryptography.RSACryptoServiceProvider.KeySize.

Referenced by System.Security.Cryptography.RSACryptoServiceProvider.Decrypt().