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

◆ GetPropertyAsString()

static unsafe string Internal.Cryptography.Helpers.GetPropertyAsString ( this SafeNCryptHandle ncryptHandle,
string propertyName,
CngPropertyOptions options )
inlinestatic

Definition at line 85 of file Helpers.cs.

86 {
87 byte[] property = ncryptHandle.GetProperty(propertyName, options);
88 if (property == null)
89 {
90 return null;
91 }
92 if (property.Length == 0)
93 {
94 return string.Empty;
95 }
96 fixed (byte* ptr = &property[0])
97 {
98 return Marshal.PtrToStringUni((IntPtr)ptr);
99 }
100 }
static unsafe? string PtrToStringUni(IntPtr ptr)
Definition Marshal.cs:652

References System.options, and System.Runtime.InteropServices.Marshal.PtrToStringUni().