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

◆ EncodeObject() [2/2]

static unsafe byte[] Interop.crypt32.EncodeObject ( string lpszStructType,
void * decoded )
inlinestatic

Definition at line 186 of file Interop.cs.

187 {
188 int pcbEncoded = 0;
189 if (!CryptEncodeObject(CertEncodingType.All, lpszStructType, decoded, null, ref pcbEncoded))
190 {
191 throw Marshal.GetLastWin32Error().ToCryptographicException();
192 }
193 byte[] array = new byte[pcbEncoded];
194 if (!CryptEncodeObject(CertEncodingType.All, lpszStructType, decoded, array, ref pcbEncoded))
195 {
196 throw Marshal.GetLastWin32Error().ToCryptographicException();
197 }
198 return array;
199 }
static unsafe bool CryptEncodeObject(CertEncodingType dwCertEncodingType, CryptDecodeObjectStructType lpszStructType, void *pvStructInfo, byte[] pbEncoded, ref int pcbEncoded)
Definition Interop.cs:160

References System.array, Interop.crypt32.CryptEncodeObject(), and System.Runtime.InteropServices.Marshal.GetLastWin32Error().