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

◆ HasProperty()

unsafe bool System.Security.Cryptography.CngKey.HasProperty ( string name,
CngPropertyOptions options )
inline

Definition at line 245 of file CngKey.cs.

246 {
247 if (name == null)
248 {
249 throw new ArgumentNullException("name");
250 }
251 int pcbResult;
252 global::Interop.NCrypt.ErrorCode errorCode = global::Interop.NCrypt.NCryptGetProperty(_keyHandle, name, null, 0, out pcbResult, options);
253 return errorCode switch
254 {
255 global::Interop.NCrypt.ErrorCode.NTE_NOT_FOUND => false,
256 global::Interop.NCrypt.ErrorCode.ERROR_SUCCESS => true,
257 _ => throw errorCode.ToCryptographicException(),
258 };
259 }
readonly SafeNCryptKeyHandle _keyHandle
Definition CngKey.cs:11

References System.Security.Cryptography.CngKey._keyHandle, and System.options.