From 0a46c92ae767c0be4af1f744a20afe9b8ca6a51f Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sun, 1 Sep 2013 21:29:49 +0700 Subject: Add new constructor to take the OID explicitly, to allow use with NullDigest --- .../java/org/bouncycastle/crypto/signers/RSADigestSigner.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'core/src/main/java/org/bouncycastle/crypto/signers') diff --git a/core/src/main/java/org/bouncycastle/crypto/signers/RSADigestSigner.java b/core/src/main/java/org/bouncycastle/crypto/signers/RSADigestSigner.java index f33ed317..aaae0645 100644 --- a/core/src/main/java/org/bouncycastle/crypto/signers/RSADigestSigner.java +++ b/core/src/main/java/org/bouncycastle/crypto/signers/RSADigestSigner.java @@ -57,9 +57,15 @@ public class RSADigestSigner public RSADigestSigner( Digest digest) { - this.digest = digest; + this(digest, (ASN1ObjectIdentifier)oidMap.get(digest.getAlgorithmName())); + } - algId = new AlgorithmIdentifier((ASN1ObjectIdentifier)oidMap.get(digest.getAlgorithmName()), DERNull.INSTANCE); + public RSADigestSigner( + Digest digest, + ASN1ObjectIdentifier digestOid) + { + this.digest = digest; + this.algId = new AlgorithmIdentifier(digestOid, DERNull.INSTANCE); } /** -- cgit v1.2.3