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

◆ ReadDeviceParameterVerifyContext()

object System.Security.Cryptography.CspKeyContainerInfo.ReadDeviceParameterVerifyContext ( int keyParam)
inlineprivate

Definition at line 108 of file CspKeyContainerInfo.cs.

109 {
110 CspParameters cspParameters = new CspParameters(_parameters);
111 cspParameters.Flags &= CspProviderFlags.UseMachineKeyStore;
112 cspParameters.KeyContainerName = null;
113 SafeProvHandle safeProvHandle;
114 int num = CapiHelper.OpenCSP(cspParameters, 4026531840u, out safeProvHandle);
115 using (safeProvHandle)
116 {
117 if (num != 0)
118 {
119 throw new CryptographicException(System.SR.Format(System.SR.Cryptography_CSP_NotFound, "Error"));
120 }
121 return CapiHelper.GetProviderParameter(safeProvHandle, cspParameters.KeyNumber, keyParam);
122 }
123 }
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().