2 // System.Security.Cryptography AsymmetricSignatureDeformatter Class implementation
5 // Thomas Neidhart (tome@sbox.tugraz.at)
11 namespace System.Security.Cryptography {
14 /// Abstract base class for all asymmetric signature deformatter.
15 /// Available derived classes:
16 /// DSASignatureDeformatter, RSAPKCS1SignatureDeformatter
18 public abstract class AsymmetricSignatureDeformatter {
21 /// constructor, no idea why it is here (abstract class) :-)
22 /// just for compatibility with MS
24 public AsymmetricSignatureDeformatter () {}
27 /// Sets the hash algorithm used for verifying a signature
29 public abstract void SetHashAlgorithm (string strName);
34 public abstract void SetKey (AsymmetricAlgorithm key);
37 /// Verifies the given Signature
39 public abstract bool VerifySignature (byte[] rgbHash, byte[] rgbSignature);
42 /// Verifies the given Signature with the given hash algorithm
44 public virtual bool VerifySignature (HashAlgorithm hash, byte[] rgbSignature)
47 throw new ArgumentNullException ("hash");
48 return VerifySignature (hash.Hash, rgbSignature);
51 } // AsymmetricSignatureDeformatter
53 } // System.Security.Cryptography