diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-28 15:37:25 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-28 15:37:25 +0700 |
commit | 3ce45e18811232677715a3bf4ba144a72b639942 (patch) | |
tree | 228c87fb260e125c66b34334cedb9b34b07a4dac /crypto/src/openpgp/PGPKeyRing.cs | |
parent | Generics migration in Crmf, Crypto, Math (diff) | |
download | BouncyCastle.NET-ed25519-3ce45e18811232677715a3bf4ba144a72b639942.tar.xz |
Generics migration in Ocsp, OpenPgp
Diffstat (limited to 'crypto/src/openpgp/PGPKeyRing.cs')
-rw-r--r-- | crypto/src/openpgp/PGPKeyRing.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/crypto/src/openpgp/PGPKeyRing.cs b/crypto/src/openpgp/PGPKeyRing.cs index 9d9454f54..52db80209 100644 --- a/crypto/src/openpgp/PGPKeyRing.cs +++ b/crypto/src/openpgp/PGPKeyRing.cs @@ -1,4 +1,5 @@ -using System.Collections; +using System; +using System.Collections.Generic; using System.IO; using Org.BouncyCastle.Utilities; @@ -19,11 +20,11 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp return tag == PacketTag.Trust ? (TrustPacket)pIn.ReadPacket() : null; } - internal static IList ReadSignaturesAndTrust(BcpgInputStream pIn) + internal static IList<PgpSignature> ReadSignaturesAndTrust(BcpgInputStream pIn) { try { - IList sigList = Platform.CreateArrayList(); + var sigList = new List<PgpSignature>(); while (pIn.SkipMarkerPackets() == PacketTag.Signature) { @@ -41,11 +42,12 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp } } - internal static void ReadUserIDs(BcpgInputStream pIn, out IList ids, out IList idTrusts, out IList idSigs) + internal static void ReadUserIDs(BcpgInputStream pIn, out IList<object> ids, out IList<TrustPacket> idTrusts, + out IList<IList<PgpSignature>> idSigs) { - ids = Platform.CreateArrayList(); - idTrusts = Platform.CreateArrayList(); - idSigs = Platform.CreateArrayList(); + ids = new List<object>(); + idTrusts = new List<TrustPacket>(); + idSigs = new List<IList<PgpSignature>>(); while (IsUserTag(pIn.SkipMarkerPackets())) { |