Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PinAndClear.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Runtime.InteropServices
;
3
4
namespace
Internal.Cryptography
;
5
6
internal
struct
PinAndClear
:
IDisposable
7
{
8
private
byte
[]
_data
;
9
10
private
GCHandle
_gcHandle
;
11
12
internal
static
PinAndClear
Track
(
byte
[] data)
13
{
14
PinAndClear
result =
default
(
PinAndClear
);
15
result._gcHandle =
GCHandle
.
Alloc
(data,
GCHandleType
.Pinned);
16
result._data = data;
17
return
result;
18
}
19
20
public
void
Dispose
()
21
{
22
Array
.
Clear
(
_data
);
23
_gcHandle
.
Free
();
24
}
25
}
System.Array.Clear
static unsafe void Clear(Array array)
Definition
Array.cs:755
System.Array
Definition
Array.cs:16
System.IDisposable
Definition
IDisposable.cs:4
Internal.Cryptography
Definition
AesBCryptModes.cs:5
System.Runtime.InteropServices.GCHandleType
GCHandleType
Definition
GCHandleType.cs:4
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System
Definition
BlockingCollection.cs:8
Internal.Cryptography.PinAndClear._data
byte[] _data
Definition
PinAndClear.cs:8
Internal.Cryptography.PinAndClear.Track
static PinAndClear Track(byte[] data)
Definition
PinAndClear.cs:12
Internal.Cryptography.PinAndClear._gcHandle
GCHandle _gcHandle
Definition
PinAndClear.cs:10
Internal.Cryptography.PinAndClear.Dispose
void Dispose()
Definition
PinAndClear.cs:20
Internal.Cryptography.PinAndClear
Definition
PinAndClear.cs:7
System.Runtime.InteropServices.GCHandle.Free
void Free()
Definition
GCHandle.cs:91
System.Runtime.InteropServices.GCHandle.Alloc
static GCHandle Alloc(object? value)
Definition
GCHandle.cs:81
System.Runtime.InteropServices.GCHandle
Definition
GCHandle.cs:9
source
System.Security.Cryptography.X509Certificates
Internal.Cryptography
PinAndClear.cs
Generated by
1.10.0