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

◆ KeyAlgorithmParameters

unsafe byte [] Internal.Cryptography.Pal.CertificatePal.KeyAlgorithmParameters
get

Implements Internal.Cryptography.ICertificatePalCore.

Definition at line 56 of file CertificatePal.cs.

57 {
58 get
59 {
61 string text = Marshal.PtrToStringAnsi(certContext->pCertInfo->SubjectPublicKeyInfo.Algorithm.pszObjId);
62 int num = ((!(text == "1.2.840.113549.1.1.1")) ? global::Interop.Crypt32.FindOidInfo(global::Interop.Crypt32.CryptOidInfoKeyType.CRYPT_OID_INFO_OID_KEY, text, OidGroup.PublicKeyAlgorithm, fallBackToAllGroups: true).AlgId : 41984);
63 byte* ptr = (byte*)5;
64 byte[] result = ((num != 8704 || certContext->pCertInfo->SubjectPublicKeyInfo.Algorithm.Parameters.cbData != 0 || certContext->pCertInfo->SubjectPublicKeyInfo.Algorithm.Parameters.pbData != ptr) ? certContext->pCertInfo->SubjectPublicKeyInfo.Algorithm.Parameters.ToByteArray() : PropagateKeyAlgorithmParametersFromChain());
65 GC.KeepAlive(this);
66 return result;
67 }
68 }
static void KeepAlive(object? obj)
Definition GC.cs:180
Definition GC.cs:8
static unsafe? string PtrToStringAnsi(IntPtr ptr)
Definition Marshal.cs:630