summary refs log tree commit diff
path: root/crypto/src/asn1/Asn1Sequence.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-03-07 16:03:07 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-03-07 16:03:07 +0700
commite47f41dbe4e61cb190154693b72bc99eb6ca6c3e (patch)
treed92fd90fc444d6141745c8ae0d60838f92502e06 /crypto/src/asn1/Asn1Sequence.cs
parentAdd BasicGcmMultiplier.IsHardwareAccelerated (diff)
downloadBouncyCastle.NET-ed25519-e47f41dbe4e61cb190154693b72bc99eb6ca6c3e.tar.xz
Remove lazy ASN.1 behaviour
Diffstat (limited to 'crypto/src/asn1/Asn1Sequence.cs')
-rw-r--r--crypto/src/asn1/Asn1Sequence.cs7
1 files changed, 1 insertions, 6 deletions
diff --git a/crypto/src/asn1/Asn1Sequence.cs b/crypto/src/asn1/Asn1Sequence.cs
index a8191de99..5b404d248 100644
--- a/crypto/src/asn1/Asn1Sequence.cs
+++ b/crypto/src/asn1/Asn1Sequence.cs
@@ -76,8 +76,7 @@ namespace Org.BouncyCastle.Asn1
             return (Asn1Sequence)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
         }
 
-        // NOTE: Only non-readonly to support LazyDLSequence
-        internal Asn1Encodable[] elements;
+        internal readonly Asn1Encodable[] elements;
 
         protected internal Asn1Sequence()
         {
@@ -145,7 +144,6 @@ namespace Org.BouncyCastle.Asn1
                 Asn1Sequence outer)
             {
                 this.outer = outer;
-                // NOTE: Call Count here to 'force' a LazyDerSequence
                 this.max = outer.Count;
             }
 
@@ -198,7 +196,6 @@ namespace Org.BouncyCastle.Asn1
 
         public virtual T[] MapElements<T>(Func<Asn1Encodable, T> func)
         {
-            // NOTE: Call Count here to 'force' a LazyDerSequence
             int count = Count;
             T[] result = new T[count];
             for (int i = 0; i < count; ++i)
@@ -215,7 +212,6 @@ namespace Org.BouncyCastle.Asn1
 
         protected override int Asn1GetHashCode()
         {
-            // NOTE: Call Count here to 'force' a LazyDerSequence
             int i = Count;
             int hc = i + 1;
 
@@ -234,7 +230,6 @@ namespace Org.BouncyCastle.Asn1
             if (null == that)
                 return false;
 
-            // NOTE: Call Count here (on both) to 'force' a LazyDerSequence
             int count = this.Count;
             if (that.Count != count)
                 return false;