From 71dded0d6d58c2e805054bd8a66750f8008b2a9f Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sat, 27 Oct 2018 18:41:07 +0700 Subject: Provide the option to pass a different RSA engine --- crypto/src/crypto/signers/RsaDigestSigner.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'crypto') diff --git a/crypto/src/crypto/signers/RsaDigestSigner.cs b/crypto/src/crypto/signers/RsaDigestSigner.cs index b210de03e..c23566e96 100644 --- a/crypto/src/crypto/signers/RsaDigestSigner.cs +++ b/crypto/src/crypto/signers/RsaDigestSigner.cs @@ -69,8 +69,13 @@ namespace Org.BouncyCastle.Crypto.Signers } public RsaDigestSigner(IRsa rsa, IDigest digest, AlgorithmIdentifier algId) + : this(new RsaBlindedEngine(rsa), digest, algId) { - this.rsaEngine = new Pkcs1Encoding(new RsaBlindedEngine(rsa)); + } + + public RsaDigestSigner(IAsymmetricBlockCipher rsaEngine, IDigest digest, AlgorithmIdentifier algId) + { + this.rsaEngine = new Pkcs1Encoding(rsaEngine); this.digest = digest; this.algId = algId; } -- cgit 1.4.1