Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
HMAC.cs
Go to the documentation of this file.
2
4
5public abstract class HMAC : KeyedHashAlgorithm
6{
7 private string _hashName;
8
9 private int _blockSizeValue = 64;
10
11 protected int BlockSizeValue
12 {
13 get
14 {
15 return _blockSizeValue;
16 }
17 set
18 {
20 }
21 }
22
23 public string HashName
24 {
25 get
26 {
27 return _hashName;
28 }
29 set
30 {
31 if (value == null)
32 {
33 throw new ArgumentNullException("HashName");
34 }
35 if (_hashName != null && value != _hashName)
36 {
38 }
40 }
41 }
42
43 public override byte[] Key
44 {
45 get
46 {
47 return base.Key;
48 }
49 set
50 {
51 base.Key = value;
52 }
53 }
54
55 [Obsolete("The default implementation of this cryptography algorithm is not supported.", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
60
61 [RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
62 public new static HMAC? Create(string algorithmName)
63 {
64 return (HMAC)CryptoConfigForwarder.CreateFromName(algorithmName);
65 }
66
67 protected override void Dispose(bool disposing)
68 {
69 base.Dispose(disposing);
70 }
71
72 protected override void HashCore(byte[] rgb, int ib, int cb)
73 {
75 }
76
81
82 protected override byte[] HashFinal()
83 {
85 }
86
87 protected override bool TryHashFinal(Span<byte> destination, out int bytesWritten)
88 {
90 }
91
92 public override void Initialize()
93 {
95 }
96}
static string Cryptography_DefaultAlgorithm_NotSupported
Definition SR.cs:34
static string HashNameMultipleSetNotSupported
Definition SR.cs:68
static string CryptoConfigNotSupported
Definition SR.cs:70
Definition SR.cs:7
override void HashCore(byte[] rgb, int ib, int cb)
Definition HMAC.cs:72
override byte[] HashFinal()
Definition HMAC.cs:82
override void Dispose(bool disposing)
Definition HMAC.cs:67
override void Initialize()
Definition HMAC.cs:92
override void HashCore(ReadOnlySpan< byte > source)
Definition HMAC.cs:77
override bool TryHashFinal(Span< byte > destination, out int bytesWritten)
Definition HMAC.cs:87
static new? HMAC Create(string algorithmName)
Definition HMAC.cs:62
static new HMAC Create()
Definition HMAC.cs:56