summary refs log tree commit diff
path: root/crypto/src/asn1/LazyDLSet.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-03-04 19:27:07 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-03-04 19:27:07 +0700
commita6715726bf540ba2466eaed927028dab08fd97f0 (patch)
tree21ca7d5091a29506580e9028d40a72f466482833 /crypto/src/asn1/LazyDLSet.cs
parentRefactoring in CipherFactory (diff)
downloadBouncyCastle.NET-ed25519-a6715726bf540ba2466eaed927028dab08fd97f0.tar.xz
Refactor Asn1Set classes
Diffstat (limited to '')
-rw-r--r--crypto/src/asn1/LazyDLSet.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/src/asn1/LazyDLSet.cs b/crypto/src/asn1/LazyDLSet.cs
index 1b8b3ef40..7386e72ba 100644
--- a/crypto/src/asn1/LazyDLSet.cs
+++ b/crypto/src/asn1/LazyDLSet.cs
@@ -7,15 +7,15 @@ namespace Org.BouncyCastle.Asn1
     internal class LazyDLSet
         : DLSet
     {
-        private byte[] encoded;
+        private byte[] m_encoded;
 
         internal LazyDLSet(byte[] encoded)
             : base()
         {
             if (null == encoded)
-                throw new ArgumentNullException("encoded");
+                throw new ArgumentNullException(nameof(encoded));
 
-            this.encoded = encoded;
+            m_encoded = encoded;
         }
 
         public override Asn1Encodable this[int index]
@@ -97,16 +97,16 @@ namespace Org.BouncyCastle.Asn1
         {
             lock (this)
             {
-                if (null != encoded)
+                if (null != m_encoded)
                 {
-                    Asn1InputStream input = new LazyAsn1InputStream(encoded);
+                    Asn1InputStream input = new LazyAsn1InputStream(m_encoded);
                     try
                     {
                         Asn1EncodableVector v = input.ReadVector();
 
-                        this.elements = v.TakeElements();
-                        this.isSorted = elements.Length < 2;
-                        this.encoded = null;
+                        m_elements = v.TakeElements();
+                        m_sortedElements = m_elements.Length <= 1 ? m_elements : null;
+                        m_encoded = null;
                     }
                     catch (IOException e)
                     {
@@ -118,7 +118,7 @@ namespace Org.BouncyCastle.Asn1
 
         private byte[] GetContents()
         {
-            lock (this) return encoded;
+            lock (this) return m_encoded;
         }
     }
 }