public VerifyData ( System.Stream data, byte signature, HashAlgorithmName hashAlgorithm ) : bool | ||
data | System.Stream | |
signature | byte | |
hashAlgorithm | HashAlgorithmName | |
return | bool |
public bool VerifyData(Stream data, byte[] signature, HashAlgorithmName hashAlgorithm)
{
if (data == null)
throw new ArgumentNullException(nameof(data));
if (signature == null)
throw new ArgumentNullException(nameof(signature));
if (string.IsNullOrEmpty(hashAlgorithm.Name))
throw new ArgumentException(SR.Cryptography_HashAlgorithmNameNullOrEmpty, nameof(hashAlgorithm));
byte[] hash = HashData(data, hashAlgorithm);
return VerifyHash(hash, signature);
}
ECDsa::VerifyData ( byte data, byte signature, HashAlgorithmName hashAlgorithm ) : bool | |
ECDsa::VerifyData ( byte data, int offset, int count, byte signature, HashAlgorithmName hashAlgorithm ) : bool |