AsymmetricSignatureDeformatter.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Security / Cryptography / AsymmetricSignatureDeformatter.cs / 1 / AsymmetricSignatureDeformatter.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 

// 
// AsymmetricSignatureDeformatter.cs 
//
 
namespace System.Security.Cryptography {
    using System.Security;
    using System;
 
[System.Runtime.InteropServices.ComVisible(true)]
    public abstract class AsymmetricSignatureDeformatter  { 
        // 
        // protected constructors
        // 

        protected AsymmetricSignatureDeformatter() {
        }
 
        //
        // public methods 
        // 

        abstract public void SetKey(AsymmetricAlgorithm key); 
        abstract public void SetHashAlgorithm(String strName);

        public virtual bool VerifySignature(HashAlgorithm hash, byte[] rgbSignature) {
            if (hash == null) throw new ArgumentNullException("hash"); 
            SetHashAlgorithm(hash.ToString());
            return VerifySignature(hash.Hash, rgbSignature); 
        } 

        abstract public bool VerifySignature(byte[] rgbHash, byte[] rgbSignature); 
    }
}


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK