Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ VerifyData() [3/8]

virtual bool System.Security.Cryptography.DSA.VerifyData ( byte[] data,
int offset,
int count,
byte[] signature,
HashAlgorithmName hashAlgorithm )
inlinevirtualinherited

Definition at line 210 of file DSA.cs.

211 {
212 if (data == null)
213 {
214 throw new ArgumentNullException("data");
215 }
216 if (offset < 0 || offset > data.Length)
217 {
218 throw new ArgumentOutOfRangeException("offset");
219 }
220 if (count < 0 || count > data.Length - offset)
221 {
222 throw new ArgumentOutOfRangeException("count");
223 }
224 if (signature == null)
225 {
226 throw new ArgumentNullException("signature");
227 }
228 if (string.IsNullOrEmpty(hashAlgorithm.Name))
229 {
231 }
232 byte[] rgbHash = HashData(data, offset, count, hashAlgorithm);
233 return VerifySignature(rgbHash, signature);
234 }
virtual byte[] HashData(byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm)
Definition DSA.cs:69
bool VerifySignature(byte[] rgbHash, byte[] rgbSignature)
static Exception HashAlgorithmNameNullOrEmpty()
Definition DSA.cs:524

References System.count, System.Security.Cryptography.DSA.HashAlgorithmNameNullOrEmpty(), System.Security.Cryptography.DSA.HashData(), System.Security.Cryptography.HashAlgorithmName.Name, System.offset, and System.Security.Cryptography.DSA.VerifySignature().