diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2018-10-27 18:41:07 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2018-10-27 18:41:07 +0700 |
commit | 71dded0d6d58c2e805054bd8a66750f8008b2a9f (patch) | |
tree | 69ba917298a1574e4cf2d38ed9b1634d90c1d493 | |
parent | Reverted short nonce on decryption change (diff) | |
download | BouncyCastle.NET-ed25519-71dded0d6d58c2e805054bd8a66750f8008b2a9f.tar.xz |
Provide the option to pass a different RSA engine
-rw-r--r-- | crypto/src/crypto/signers/RsaDigestSigner.cs | 7 |
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; } |