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

◆ ReadKeyParameterSilent()

object System.Security.Cryptography.CspKeyContainerInfo.ReadKeyParameterSilent ( int keyParam,
bool throwOnNotFound = true )
inlineprivate

Definition at line 90 of file CspKeyContainerInfo.cs.

91 {
92 SafeProvHandle safeProvHandle;
93 int num = CapiHelper.OpenCSP(_parameters, 64u, out safeProvHandle);
94 using (safeProvHandle)
95 {
96 if (num != 0)
97 {
98 if (throwOnNotFound)
99 {
100 throw new CryptographicException(System.SR.Format(System.SR.Cryptography_CSP_NotFound, "Error"));
101 }
102 return null;
103 }
104 return CapiHelper.GetProviderParameter(safeProvHandle, _parameters.KeyNumber, keyParam);
105 }
106 }
static object GetProviderParameter(SafeProvHandle safeProvHandle, int keyNumber, int keyParam)
static int OpenCSP(CspParameters cspParameters, uint flags, out SafeProvHandle safeProvHandle)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Cryptography_CSP_NotFound
Definition SR.cs:24
Definition SR.cs:7

References System.Security.Cryptography.CspKeyContainerInfo._parameters, System.SR.Cryptography_CSP_NotFound, System.SR.Format(), Internal.NativeCrypto.CapiHelper.GetProviderParameter(), System.Security.Cryptography.CspParameters.KeyNumber, and Internal.NativeCrypto.CapiHelper.OpenCSP().