diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-09-20 15:19:15 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-09-20 15:19:15 +0700 |
commit | d438290428230551ff568329478b0e45e5085b44 (patch) | |
tree | 423683961e53d42c709660dc4838d1bfb02f4a07 /crypto/src/pkcs | |
parent | Update Asn1.Cmp from bc-java (diff) | |
download | BouncyCastle.NET-ed25519-d438290428230551ff568329478b0e45e5085b44.tar.xz |
Give IStreamCalculator a generic type
Diffstat (limited to 'crypto/src/pkcs')
-rw-r--r-- | crypto/src/pkcs/Pkcs10CertificationRequest.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/pkcs/Pkcs10CertificationRequest.cs b/crypto/src/pkcs/Pkcs10CertificationRequest.cs index be4cbb570..59b5b51ed 100644 --- a/crypto/src/pkcs/Pkcs10CertificationRequest.cs +++ b/crypto/src/pkcs/Pkcs10CertificationRequest.cs @@ -281,14 +281,14 @@ namespace Org.BouncyCastle.Pkcs this.reqInfo = new CertificationRequestInfo(subject, pubInfo, attributes); - IStreamCalculator streamCalculator = signatureFactory.CreateCalculator(); + IStreamCalculator<IBlockResult> streamCalculator = signatureFactory.CreateCalculator(); using (Stream sigStream = streamCalculator.Stream) { reqInfo.EncodeTo(sigStream, Der); } // Generate Signature. - sigBits = new DerBitString(((IBlockResult)streamCalculator.GetResult()).Collect()); + sigBits = new DerBitString(streamCalculator.GetResult().Collect()); } // internal Pkcs10CertificationRequest( @@ -344,13 +344,13 @@ namespace Org.BouncyCastle.Pkcs { byte[] b = reqInfo.GetDerEncoded(); - IStreamCalculator streamCalculator = verifier.CreateCalculator(); + IStreamCalculator<IVerifier> streamCalculator = verifier.CreateCalculator(); streamCalculator.Stream.Write(b, 0, b.Length); Platform.Dispose(streamCalculator.Stream); - return ((IVerifier)streamCalculator.GetResult()).IsVerified(sigBits.GetOctets()); + return streamCalculator.GetResult().IsVerified(sigBits.GetOctets()); } catch (Exception e) { |