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

◆ DecodeObjectNoThrow()

static unsafe bool Internal.Cryptography.Pal.Native.Helpers.DecodeObjectNoThrow ( this byte[] encoded,
CryptDecodeObjectStructType lpszStructType,
DecodedObjectReceiver receiver )
inlinestatic

Definition at line 86 of file Helpers.cs.

87 {
88 int pcbStructInfo = 0;
89 if (!global::Interop.crypt32.CryptDecodeObjectPointer(CertEncodingType.All, lpszStructType, encoded, encoded.Length, CryptDecodeObjectFlags.None, null, ref pcbStructInfo))
90 {
91 return false;
92 }
93 byte* ptr = stackalloc byte[(int)(uint)pcbStructInfo];
94 if (!global::Interop.crypt32.CryptDecodeObjectPointer(CertEncodingType.All, lpszStructType, encoded, encoded.Length, CryptDecodeObjectFlags.None, ptr, ref pcbStructInfo))
95 {
96 return false;
97 }
98 receiver(ptr, pcbStructInfo);
99 return true;
100 }