コード例 #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
ファイル: MD5SHA1.cs プロジェクト: ramayasket/Web.Transfer
        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
ファイル: MD5SHA1.cs プロジェクト: VimalKumarS/mono-tls
		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);
		}