diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-27 21:11:59 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-27 21:11:59 +0700 |
commit | 35cfd51633bbbbc92c2c17c76646e9a9dc945b11 (patch) | |
tree | 563cda15bf08c63de832198be2b9e0263bae5e60 /crypto/src/asn1/icao | |
parent | Split up fast/slow tests (diff) | |
download | BouncyCastle.NET-ed25519-35cfd51633bbbbc92c2c17c76646e9a9dc945b11.tar.xz |
Generics migration in Asn1
Diffstat (limited to 'crypto/src/asn1/icao')
-rw-r--r-- | crypto/src/asn1/icao/DataGroupHash.cs | 9 | ||||
-rw-r--r-- | crypto/src/asn1/icao/LDSSecurityObject.cs | 9 |
2 files changed, 5 insertions, 13 deletions
diff --git a/crypto/src/asn1/icao/DataGroupHash.cs b/crypto/src/asn1/icao/DataGroupHash.cs index bf83718f3..c4a674152 100644 --- a/crypto/src/asn1/icao/DataGroupHash.cs +++ b/crypto/src/asn1/icao/DataGroupHash.cs @@ -1,7 +1,4 @@ using System; -using System.Collections; - -using Org.BouncyCastle.Asn1; namespace Org.BouncyCastle.Asn1.Icao { @@ -38,8 +35,7 @@ namespace Org.BouncyCastle.Asn1.Icao private readonly DerInteger dataGroupNumber; private readonly Asn1OctetString dataGroupHashValue; - public static DataGroupHash GetInstance( - object obj) + public static DataGroupHash GetInstance(object obj) { if (obj is DataGroupHash) return (DataGroupHash)obj; @@ -50,8 +46,7 @@ namespace Org.BouncyCastle.Asn1.Icao return null; } - private DataGroupHash( - Asn1Sequence seq) + private DataGroupHash(Asn1Sequence seq) { if (seq.Count != 2) throw new ArgumentException("Wrong number of elements in sequence", "seq"); diff --git a/crypto/src/asn1/icao/LDSSecurityObject.cs b/crypto/src/asn1/icao/LDSSecurityObject.cs index 5d7331a4f..c379d76bb 100644 --- a/crypto/src/asn1/icao/LDSSecurityObject.cs +++ b/crypto/src/asn1/icao/LDSSecurityObject.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using Org.BouncyCastle.Asn1.X509; using Org.BouncyCastle.Math; @@ -31,8 +30,7 @@ namespace Org.BouncyCastle.Asn1.Icao private DataGroupHash[] datagroupHash; private LdsVersionInfo versionInfo; - public static LdsSecurityObject GetInstance( - object obj) + public static LdsSecurityObject GetInstance(object obj) { if (obj is LdsSecurityObject) return (LdsSecurityObject)obj; @@ -43,13 +41,12 @@ namespace Org.BouncyCastle.Asn1.Icao return null; } - private LdsSecurityObject( - Asn1Sequence seq) + private LdsSecurityObject(Asn1Sequence seq) { if (seq == null || seq.Count == 0) throw new ArgumentException("null or empty sequence passed."); - IEnumerator e = seq.GetEnumerator(); + var e = seq.GetEnumerator(); // version e.MoveNext(); |