Ejemplo n.º 1
0
        public byte[] CreateSignature(RSA rsa)
        {
            if (rsa == null)
            {
                throw new CryptographicUnexpectedOperationException("missing key");
            }
            RSASslSignatureFormatter rsasslSignatureFormatter = new RSASslSignatureFormatter(rsa);

            rsasslSignatureFormatter.SetHashAlgorithm("MD5SHA1");
            return(rsasslSignatureFormatter.CreateSignature(this.Hash));
        }
Ejemplo n.º 2
0
        public byte[] CreateSignature(RSA rsa)
        {
            if (rsa == null)
            {
                throw new CryptographicUnexpectedOperationException("missing key");
            }
            RSASslSignatureFormatter signatureFormatter = new RSASslSignatureFormatter((AsymmetricAlgorithm)rsa);

            signatureFormatter.SetHashAlgorithm(nameof(MD5SHA1));
            return(signatureFormatter.CreateSignature(this.Hash));
        }
Ejemplo n.º 3
0
		public byte[] CreateSignature(RSA rsa) 
		{
			if (rsa == null)
			{
				throw new CryptographicUnexpectedOperationException ("missing key");
			}

			RSASslSignatureFormatter f = new RSASslSignatureFormatter(rsa);
			f.SetHashAlgorithm("MD5SHA1");

			return f.CreateSignature(this.Hash);
		}