From f06dc7c2f2e578c77bdb53ff981c578c3fe017eb Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Thu, 1 Aug 2019 20:30:22 +0700 Subject: Rewrite Asn1Sequence/Set to store elements as Asn1Encodable[] --- crypto/src/asn1/BerSet.cs | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'crypto/src/asn1/BerSet.cs') diff --git a/crypto/src/asn1/BerSet.cs b/crypto/src/asn1/BerSet.cs index a181e172d..6209e71a8 100644 --- a/crypto/src/asn1/BerSet.cs +++ b/crypto/src/asn1/BerSet.cs @@ -5,48 +5,46 @@ namespace Org.BouncyCastle.Asn1 { public static new readonly BerSet Empty = new BerSet(); - public static new BerSet FromVector( - Asn1EncodableVector v) + public static new BerSet FromVector(Asn1EncodableVector elementVector) { - return v.Count < 1 ? Empty : new BerSet(v); + return elementVector.Count < 1 ? Empty : new BerSet(elementVector); } - internal static new BerSet FromVector( - Asn1EncodableVector v, - bool needsSorting) + internal static new BerSet FromVector(Asn1EncodableVector elementVector, bool needsSorting) { - return v.Count < 1 ? Empty : new BerSet(v, needsSorting); + return elementVector.Count < 1 ? Empty : new BerSet(elementVector, needsSorting); } /** * create an empty sequence */ public BerSet() + : base() { } /** * create a set containing one object */ - public BerSet(Asn1Encodable obj) : base(obj) + public BerSet(Asn1Encodable element) + : base(element) { } /** * create a set containing a vector of objects. */ - public BerSet(Asn1EncodableVector v) : base(v, false) + public BerSet(Asn1EncodableVector elementVector) + : base(elementVector, false) { } - internal BerSet(Asn1EncodableVector v, bool needsSorting) : base(v, needsSorting) + internal BerSet(Asn1EncodableVector elementVector, bool needsSorting) + : base(elementVector, needsSorting) { } - /* - */ - internal override void Encode( - DerOutputStream derOut) + internal override void Encode(DerOutputStream derOut) { if (derOut is Asn1OutputStream || derOut is BerOutputStream) { -- cgit 1.4.1