System.Security.Cryptography.DSA.VerifyData C# (CSharp) Method

VerifyData() public method

public VerifyData ( Stream data, byte signature, HashAlgorithmName hashAlgorithm ) : bool
data System.IO.Stream
signature byte
hashAlgorithm HashAlgorithmName
return bool
        public virtual 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 HashAlgorithmNameNullOrEmpty(); }

            byte[] hash = HashData(data, hashAlgorithm);
            return VerifySignature(hash, signature);
        }

Same methods

DSA::VerifyData ( byte data, byte signature, HashAlgorithmName hashAlgorithm ) : bool
DSA::VerifyData ( byte data, int offset, int count, byte signature, HashAlgorithmName hashAlgorithm ) : bool

Usage Example

Beispiel #1
0
 public override bool VerifyData(
     byte[] data,
     int offset,
     int count,
     byte[] signature,
     HashAlgorithmName hashAlgorithm) =>
 _wrapped.VerifyData(data, offset, count, signature, hashAlgorithm);
All Usage Examples Of System.Security.Cryptography.DSA::VerifyData