示例#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));
        }
示例#2
0
        public bool VerifySignature(RSA rsa, byte[] rgbSignature)
        {
            if (rsa == null)
            {
                throw new CryptographicUnexpectedOperationException("missing key");
            }
            if (rgbSignature == null)
            {
                throw new ArgumentNullException(nameof(rgbSignature));
            }
            RSASslSignatureDeformatter signatureDeformatter = new RSASslSignatureDeformatter((AsymmetricAlgorithm)rsa);

            signatureDeformatter.SetHashAlgorithm(nameof(MD5SHA1));
            return(signatureDeformatter.VerifySignature(this.Hash, rgbSignature));
        }
示例#3
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);
		}