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

◆ VerifyData() [4/8]

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

Definition at line 236 of file DSA.cs.

237 {
238 if (data == null)
239 {
240 throw new ArgumentNullException("data");
241 }
242 if (offset < 0 || offset > data.Length)
243 {
244 throw new ArgumentOutOfRangeException("offset");
245 }
246 if (count < 0 || count > data.Length - offset)
247 {
248 throw new ArgumentOutOfRangeException("count");
249 }
250 if (signature == null)
251 {
252 throw new ArgumentNullException("signature");
253 }
254 if (string.IsNullOrEmpty(hashAlgorithm.Name))
255 {
257 }
258 if (!signatureFormat.IsKnownValue())
259 {
260 throw DSASignatureFormatHelpers.CreateUnknownValueException(signatureFormat);
261 }
262 return VerifyDataCore(new ReadOnlySpan<byte>(data, offset, count), signature, hashAlgorithm, signatureFormat);
263 }
virtual bool VerifyDataCore(Stream data, ReadOnlySpan< byte > signature, HashAlgorithmName hashAlgorithm, DSASignatureFormat signatureFormat)
Definition DSA.cs:422
static Exception HashAlgorithmNameNullOrEmpty()
Definition DSA.cs:524

References System.count, System.Security.Cryptography.DSASignatureFormatHelpers.CreateUnknownValueException(), System.Security.Cryptography.DSA.HashAlgorithmNameNullOrEmpty(), System.Security.Cryptography.HashAlgorithmName.Name, System.offset, and System.Security.Cryptography.DSA.VerifyDataCore().