summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2018-10-27 18:41:07 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2018-10-27 18:41:07 +0700
commit71dded0d6d58c2e805054bd8a66750f8008b2a9f (patch)
tree69ba917298a1574e4cf2d38ed9b1634d90c1d493 /crypto
parentReverted short nonce on decryption change (diff)
downloadBouncyCastle.NET-ed25519-71dded0d6d58c2e805054bd8a66750f8008b2a9f.tar.xz
Provide the option to pass a different RSA engine
Diffstat (limited to 'crypto')
-rw-r--r--crypto/src/crypto/signers/RsaDigestSigner.cs7
1 files changed, 6 insertions, 1 deletions
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;
         }