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

◆ UpgradeRSA()

static string Internal.NativeCrypto.CapiHelper.UpgradeRSA ( int dwProvType,
string wszProvider )
inlinestatic

Definition at line 439 of file CapiHelper.cs.

440 {
441 bool flag = string.Equals(wszProvider, "Microsoft Enhanced Cryptographic Provider v1.0", StringComparison.Ordinal);
442 bool flag2 = string.Equals(wszProvider, "Microsoft Base Cryptographic Provider v1.0", StringComparison.Ordinal);
443 string result = null;
444 if (flag2 || flag)
445 {
446 if (AcquireCryptContext(out var safeProvHandle, null, "Microsoft Enhanced RSA and AES Cryptographic Provider", dwProvType, 4026531840u) == 0)
447 {
448 result = "Microsoft Enhanced RSA and AES Cryptographic Provider";
449 }
450 safeProvHandle.Dispose();
451 }
452 return result;
453 }
static int AcquireCryptContext(out SafeProvHandle safeProvHandle, string keyContainer, string providerName, int providerType, uint flags)

References Internal.NativeCrypto.CapiHelper.AcquireCryptContext().

Referenced by Internal.NativeCrypto.CapiHelper.GetDefaultProvider().