Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DSASignatureFormatter.cs
Go to the documentation of this file.
2
4
5[UnsupportedOSPlatform("browser")]
7{
8 private DSA _dsaKey;
9
11 {
12 }
13
15 : this()
16 {
17 if (key == null)
18 {
19 throw new ArgumentNullException("key");
20 }
21 _dsaKey = (DSA)key;
22 }
23
24 public override void SetKey(AsymmetricAlgorithm key)
25 {
26 if (key == null)
27 {
28 throw new ArgumentNullException("key");
29 }
30 _dsaKey = (DSA)key;
31 }
32
33 public override void SetHashAlgorithm(string strName)
34 {
35 if (strName.ToUpperInvariant() != "SHA1")
36 {
38 }
39 }
40
41 public override byte[] CreateSignature(byte[] rgbHash)
42 {
43 if (rgbHash == null)
44 {
45 throw new ArgumentNullException("rgbHash");
46 }
47 if (_dsaKey == null)
48 {
50 }
51 return _dsaKey.CreateSignature(rgbHash);
52 }
53}
static string Cryptography_InvalidOperation
Definition SR.cs:104
static string Cryptography_MissingKey
Definition SR.cs:114
Definition SR.cs:7
override void SetKey(AsymmetricAlgorithm key)
byte[] CreateSignature(byte[] rgbHash)