Exemplo n.º 1
0
        public bool VerifySignature(RSA rsa, byte[] rgbSignature)
        {
            if (rsa == null)
            {
                throw new CryptographicUnexpectedOperationException("missing key");
            }
            if (rgbSignature == null)
            {
                throw new ArgumentNullException("rgbSignature");
            }
            RSASslSignatureDeformatter rsasslSignatureDeformatter = new RSASslSignatureDeformatter(rsa);

            rsasslSignatureDeformatter.SetHashAlgorithm("MD5SHA1");
            return(rsasslSignatureDeformatter.VerifySignature(this.Hash, rgbSignature));
        }
Exemplo n.º 2
0
		public bool VerifySignature(RSA rsa, byte[] rgbSignature) 
		{
			if (rsa == null)
			{
				throw new CryptographicUnexpectedOperationException ("missing key");
			}
			if (rgbSignature == null)
			{
				throw new ArgumentNullException ("rgbSignature");
			}

			RSASslSignatureDeformatter d = new RSASslSignatureDeformatter(rsa);
			d.SetHashAlgorithm("MD5SHA1");

			return d.VerifySignature(this.Hash, rgbSignature);
		}