diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-27 02:19:14 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-27 02:19:14 +0700 |
commit | 4ea1816cffd5c8663bc9ae1234df0a70ef23fcd6 (patch) | |
tree | eb4fe294ef230435928a573fadef3047b4466e9b /crypto/test/src/asn1 | |
parent | Implement generic IEnumerable in ASN.1 classes (diff) | |
download | BouncyCastle.NET-ed25519-4ea1816cffd5c8663bc9ae1234df0a70ef23fcd6.tar.xz |
Generics migration work
Diffstat (limited to 'crypto/test/src/asn1')
-rw-r--r-- | crypto/test/src/asn1/test/GenerationTest.cs | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/crypto/test/src/asn1/test/GenerationTest.cs b/crypto/test/src/asn1/test/GenerationTest.cs index 76077712a..3a0fae8e7 100644 --- a/crypto/test/src/asn1/test/GenerationTest.cs +++ b/crypto/test/src/asn1/test/GenerationTest.cs @@ -1,7 +1,5 @@ using System; -using System.Collections; -using System.IO; -using System.Text; +using System.Collections.Generic; using NUnit.Framework; @@ -130,8 +128,8 @@ namespace Org.BouncyCastle.Asn1.Tests // // add extensions // - IList order = new ArrayList(); - IDictionary extensions = new Hashtable(); + var order = new List<DerObjectIdentifier>(); + var extensions = new Dictionary<DerObjectIdentifier, X509Extension>(); order.Add(X509Extensions.AuthorityKeyIdentifier); order.Add(X509Extensions.SubjectKeyIdentifier); @@ -201,8 +199,8 @@ namespace Org.BouncyCastle.Asn1.Tests // // add extensions // - IList order = new ArrayList(); - IDictionary extensions = new Hashtable(); + var order = new List<DerObjectIdentifier>(); + var extensions = new Dictionary<DerObjectIdentifier, X509Extension>(); order.Add(X509Extensions.SubjectAlternativeName); @@ -251,12 +249,13 @@ namespace Org.BouncyCastle.Asn1.Tests gen.SetSignature(new AlgorithmIdentifier(PkcsObjectIdentifiers.Sha1WithRsaEncryption, DerNull.Instance)); - // - // extensions - // - IList order = new ArrayList(); - IDictionary extensions = new Hashtable(); - SubjectPublicKeyInfo info = new SubjectPublicKeyInfo( + // + // extensions + // + var order = new List<DerObjectIdentifier>(); + var extensions = new Dictionary<DerObjectIdentifier, X509Extension>(); + + SubjectPublicKeyInfo info = new SubjectPublicKeyInfo( new AlgorithmIdentifier( OiwObjectIdentifiers.ElGamalAlgorithm, new ElGamalParameter(BigInteger.One, BigInteger.Two)), |