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

◆ EncodeObject() [1/2]

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

Definition at line 171 of file Interop.cs.

172 {
173 int pcbEncoded = 0;
174 if (!CryptEncodeObject(CertEncodingType.All, lpszStructType, decoded, null, ref pcbEncoded))
175 {
176 throw Marshal.GetLastWin32Error().ToCryptographicException();
177 }
178 byte[] array = new byte[pcbEncoded];
179 if (!CryptEncodeObject(CertEncodingType.All, lpszStructType, decoded, array, ref pcbEncoded))
180 {
181 throw Marshal.GetLastWin32Error().ToCryptographicException();
182 }
183 return array;
184 }
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().