Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DSASignatureDeformatter.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 bool VerifySignature(byte[] rgbHash, byte[] rgbSignature)
42 {
43 if (rgbHash == null)
44 {
45 throw new ArgumentNullException("rgbHash");
46 }
47 if (rgbSignature == null)
48 {
49 throw new ArgumentNullException("rgbSignature");
50 }
51 if (_dsaKey == null)
52 {
54 }
55 return _dsaKey.VerifySignature(rgbHash, rgbSignature);
56 }
57}
static string Cryptography_InvalidOperation
Definition SR.cs:104
static string Cryptography_MissingKey
Definition SR.cs:114
Definition SR.cs:7
override bool VerifySignature(byte[] rgbHash, byte[] rgbSignature)
bool VerifySignature(byte[] rgbHash, byte[] rgbSignature)