summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authormw <megan@cryptoworkshop.com>2020-08-31 10:30:31 +1000
committermw <megan@cryptoworkshop.com>2020-08-31 10:30:31 +1000
commita71fda092163f5111197798e5f6dc6d39518add8 (patch)
tree09ecf3d69e5d880056a4568fb7edfa3a77208f2d /crypto/src
parentUpdated TimeStampTokenGenerator (diff)
downloadBouncyCastle.NET-ed25519-a71fda092163f5111197798e5f6dc6d39518add8.tar.xz
renamed DigestFactory to Asn1DigestFactory
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/crypto/operators/Asn1DigestFactory.cs (renamed from crypto/src/crypto/operators/DigestFactory.cs)26
-rw-r--r--crypto/src/tsp/TimeStampToken.cs1
-rw-r--r--crypto/src/tsp/TimeStampTokenGenerator.cs9
3 files changed, 8 insertions, 28 deletions
diff --git a/crypto/src/crypto/operators/DigestFactory.cs b/crypto/src/crypto/operators/Asn1DigestFactory.cs

index 7624fdf43..2455db3a0 100644 --- a/crypto/src/crypto/operators/DigestFactory.cs +++ b/crypto/src/crypto/operators/Asn1DigestFactory.cs
@@ -1,44 +1,32 @@ using Org.BouncyCastle.Asn1; -using Org.BouncyCastle.Asn1.Nist; -using Org.BouncyCastle.Asn1.Oiw; -using Org.BouncyCastle.Asn1.Pkcs; using Org.BouncyCastle.Asn1.X509; -using Org.BouncyCastle.Crypto.Digests; using Org.BouncyCastle.Crypto.IO; -using Org.BouncyCastle.Crypto.Paddings; -using Org.BouncyCastle.Crypto.Tests; using Org.BouncyCastle.Security; using System; -using System.Collections.Generic; -using System.ComponentModel; using System.IO; -using System.Linq; -using System.Text; + namespace Org.BouncyCastle.Crypto.Operators { - - - - public class DigestFactory : IDigestFactory + public class Asn1DigestFactory : IDigestFactory { - public static DigestFactory Get(DerObjectIdentifier oid) + public static Asn1DigestFactory Get(DerObjectIdentifier oid) { - return new DigestFactory(DigestUtilities.GetDigest(oid), oid); + return new Asn1DigestFactory(DigestUtilities.GetDigest(oid), oid); } - public static DigestFactory Get(String mechanism) + public static Asn1DigestFactory Get(String mechanism) { DerObjectIdentifier oid = DigestUtilities.GetObjectIdentifier(mechanism); - return new DigestFactory(DigestUtilities.GetDigest(oid), oid); + return new Asn1DigestFactory(DigestUtilities.GetDigest(oid), oid); } private IDigest digest; private DerObjectIdentifier oid; - public DigestFactory(IDigest digest, DerObjectIdentifier oid) + public Asn1DigestFactory(IDigest digest, DerObjectIdentifier oid) { this.digest = digest; this.oid = oid; diff --git a/crypto/src/tsp/TimeStampToken.cs b/crypto/src/tsp/TimeStampToken.cs
index 32f2523ce..0615cbd76 100644 --- a/crypto/src/tsp/TimeStampToken.cs +++ b/crypto/src/tsp/TimeStampToken.cs
@@ -10,7 +10,6 @@ using Org.BouncyCastle.Asn1.Pkcs; using Org.BouncyCastle.Asn1.Tsp; using Org.BouncyCastle.Asn1.X509; using Org.BouncyCastle.Cms; -using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Security; using Org.BouncyCastle.Security.Certificates; using Org.BouncyCastle.Utilities; diff --git a/crypto/src/tsp/TimeStampTokenGenerator.cs b/crypto/src/tsp/TimeStampTokenGenerator.cs
index 3441a18a2..76228761a 100644 --- a/crypto/src/tsp/TimeStampTokenGenerator.cs +++ b/crypto/src/tsp/TimeStampTokenGenerator.cs
@@ -1,23 +1,16 @@ using System; using System.Collections; using System.IO; -using System.Runtime.InteropServices.ComTypes; using Org.BouncyCastle.Asn1; -using Org.BouncyCastle.Asn1.Cms; using Org.BouncyCastle.Asn1.Ess; -using Org.BouncyCastle.Asn1.Nist; using Org.BouncyCastle.Asn1.Oiw; using Org.BouncyCastle.Asn1.Pkcs; using Org.BouncyCastle.Asn1.Tsp; using Org.BouncyCastle.Asn1.X509; using Org.BouncyCastle.Cms; using Org.BouncyCastle.Crypto; -using Org.BouncyCastle.Crypto.IO; using Org.BouncyCastle.Crypto.Operators; -using Org.BouncyCastle.Crypto.Paddings; using Org.BouncyCastle.Math; -using Org.BouncyCastle.Security; -using Org.BouncyCastle.Security.Certificates; using Org.BouncyCastle.Utilities; using Org.BouncyCastle.X509; using Org.BouncyCastle.X509.Store; @@ -129,7 +122,7 @@ namespace Org.BouncyCastle.Tsp Asn1.Cms.AttributeTable signedAttr, Asn1.Cms.AttributeTable unsignedAttr) : this( makeInfoGenerator(key, cert, digestOID, signedAttr, unsignedAttr), - DigestFactory.Get(OiwObjectIdentifiers.IdSha1), + Asn1DigestFactory.Get(OiwObjectIdentifiers.IdSha1), tsaPolicyOID != null?new DerObjectIdentifier(tsaPolicyOID):null, false) {