using System; using System.Runtime.InteropServices; namespace System.Security.Cryptography { /// Represents the abstract base class from which all implementations of asymmetric signature deformatters derive. // Token: 0x020004E8 RID: 1256 [ComVisible(true)] public abstract class AsymmetricSignatureDeformatter { /// When overridden in a derived class, sets the hash algorithm to use for verifying the signature. /// The name of the hash algorithm to use for verifying the signature. // Token: 0x06002E94 RID: 11924 public abstract void SetHashAlgorithm(string strName); /// When overridden in a derived class, sets the public key to use for verifying the signature. /// The instance of an implementation of that holds the public key. // Token: 0x06002E95 RID: 11925 public abstract void SetKey(AsymmetricAlgorithm key); /// When overridden in a derived class, verifies the signature for the specified data. /// true if matches the signature computed using the specified hash algorithm and key on ; otherwise, false. /// The data signed with . /// The signature to be verified for . // Token: 0x06002E96 RID: 11926 public abstract bool VerifySignature(byte[] rgbHash, byte[] rgbSignature); /// Verifies the signature from the specified hash value. /// true if the signature is valid for the hash; otherwise, false. /// The hash algorithm to use to verify the signature. /// The signature to be verified. /// The parameter is null. // Token: 0x06002E97 RID: 11927 RVA: 0x000951B4 File Offset: 0x000933B4 public virtual bool VerifySignature(HashAlgorithm hash, byte[] rgbSignature) { if (hash == null) { throw new ArgumentNullException("hash"); } this.SetHashAlgorithm(hash.ToString()); return this.VerifySignature(hash.Hash, rgbSignature); } } }