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

◆ DecodeKeyBlob()

static byte[] Internal.Cryptography.Pal.X509Pal.DecodeKeyBlob ( CryptDecodeObjectStructType lpszStructType,
byte[] encodedKeyValue )
inlinestaticprivate

Definition at line 337 of file X509Pal.cs.

338 {
339 int pcbStructInfo = 0;
340 if (!global::Interop.crypt32.CryptDecodeObject(CertEncodingType.All, lpszStructType, encodedKeyValue, encodedKeyValue.Length, CryptDecodeObjectFlags.None, null, ref pcbStructInfo))
341 {
342 throw Marshal.GetLastWin32Error().ToCryptographicException();
343 }
344 byte[] array = new byte[pcbStructInfo];
345 if (!global::Interop.crypt32.CryptDecodeObject(CertEncodingType.All, lpszStructType, encodedKeyValue, encodedKeyValue.Length, CryptDecodeObjectFlags.None, array, ref pcbStructInfo))
346 {
347 throw Marshal.GetLastWin32Error().ToCryptographicException();
348 }
349 return array;
350 }

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

Referenced by Internal.Cryptography.Pal.X509Pal.DecodePublicKey().