Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CryptoThrowHelper.cs
Go to the documentation of this file.
2
4
5internal static class CryptoThrowHelper
6{
8 {
9 public WindowsCryptographicException(int hr, string message)
10 : base(message)
11 {
12 base.HResult = hr;
13 }
14 }
15
17 {
18 string message = global::Interop.Kernel32.GetMessage(hr);
19 if ((hr & 0x80000000u) != 2147483648u)
20 {
21 hr = (hr & 0xFFFF) | -2147024896;
22 }
23 return new WindowsCryptographicException(hr, message);
24 }
25}
static CryptographicException ToCryptographicException(this int hr)