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)); }
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)); }
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); }