Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
IsEphemeral
unsafe
bool
System.Security.Cryptography.CngKey.IsEphemeral
get
private set
Definition at line
53
of file
CngKey.cs
.
54
{
55
get
56
{
57
Unsafe
.SkipInit(out
byte
b);
58
if
(global::Interop.NCrypt.NCryptGetProperty(
_keyHandle
,
"CLR IsEphemeral"
, &b, 1, out var pcbResult,
CngPropertyOptions
.CustomProperty) != 0)
59
{
60
return
false
;
61
}
62
if
(pcbResult != 1)
63
{
64
return
false
;
65
}
66
if
(b != 1)
67
{
68
return
false
;
69
}
70
return
true
;
71
}
72
private
set
73
{
74
byte
b = (byte)(
value
? 1 : 0);
75
global::Interop.NCrypt.ErrorCode errorCode = global::Interop.NCrypt.NCryptSetProperty(
_keyHandle
,
"CLR IsEphemeral"
, &b, 1,
CngPropertyOptions
.CustomProperty);
76
if
(errorCode != 0)
77
{
78
throw
errorCode.ToCryptographicException();
79
}
80
}
81
}
System.Runtime.CompilerServices.Unsafe
Definition
Unsafe.cs:6
System.Security.Cryptography.CngKey._keyHandle
readonly SafeNCryptKeyHandle _keyHandle
Definition
CngKey.cs:11
System.Security.Cryptography.CngPropertyOptions
CngPropertyOptions
Definition
CngPropertyOptions.cs:5
System.ExceptionArgument.value
@ value
Referenced by
System.Security.Cryptography.CngKey.Open()
.
System
Security
Cryptography
CngKey
Generated by
1.10.0