Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ FindAlgIdOidInfo() [2/2]

static CRYPT_OID_INFO Interop.Crypt32.FindAlgIdOidInfo ( BCrypt::ECC_CURVE_ALG_ID_ENUM algId)
inlinestatic

Definition at line 538 of file Interop.cs.

539 {
540 int pvKey = (int)algId;
541 IntPtr intPtr = CryptFindOIDInfo(CryptOidInfoKeyType.CRYPT_OID_INFO_ALGID_KEY, ref pvKey, OidGroup.HashAlgorithm);
542 if (intPtr != IntPtr.Zero)
543 {
544 return Marshal.PtrToStructure<CRYPT_OID_INFO>(intPtr);
545 }
546 CRYPT_OID_INFO result = default(CRYPT_OID_INFO);
547 result.AlgId = -1;
548 return result;
549 }
static IntPtr CryptFindOIDInfo(CryptOidInfoKeyType dwKeyType, IntPtr pvKey, OidGroup group)
static ? object PtrToStructure(IntPtr ptr, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type structureType)
Definition Marshal.cs:1164
static readonly IntPtr Zero
Definition IntPtr.cs:18

References Interop.Crypt32.CryptFindOIDInfo(), System.Runtime.InteropServices.Marshal.PtrToStructure(), and System.IntPtr.Zero.