summary refs log tree commit diff
path: root/crypto/src/asn1/Asn1InputStream.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-11-21 13:56:31 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-11-21 13:56:31 +0700
commitc53008f0f5a295ade456e117b90adcc897a16f83 (patch)
tree354461b8ffaa71d4f8bddb238bb50307cdf3b094 /crypto/src/asn1/Asn1InputStream.cs
parentUse Seek when available (diff)
downloadBouncyCastle.NET-ed25519-c53008f0f5a295ade456e117b90adcc897a16f83.tar.xz
ASN.1 perf. opts
Diffstat (limited to 'crypto/src/asn1/Asn1InputStream.cs')
-rw-r--r--crypto/src/asn1/Asn1InputStream.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/asn1/Asn1InputStream.cs b/crypto/src/asn1/Asn1InputStream.cs
index 8ddfc022b..bfa4615bd 100644
--- a/crypto/src/asn1/Asn1InputStream.cs
+++ b/crypto/src/asn1/Asn1InputStream.cs
@@ -77,7 +77,7 @@ namespace Org.BouncyCastle.Asn1
         {
             // TODO[asn1] Special-case zero length first?
 
-            DefiniteLengthInputStream defIn = new DefiniteLengthInputStream(this, length, limit);
+            DefiniteLengthInputStream defIn = new DefiniteLengthInputStream(s, length, limit);
 
             if (0 == (tagHdr & Asn1Tags.Flags))
                 return CreatePrimitiveDerObject(tagNo, defIn, tmpBuffers);
@@ -154,7 +154,7 @@ namespace Org.BouncyCastle.Asn1
 
         public Asn1Object ReadObject()
         {
-            int tagHdr = ReadByte();
+            int tagHdr = s.ReadByte();
             if (tagHdr <= 0)
             {
                 if (tagHdr == 0)
@@ -184,7 +184,7 @@ namespace Org.BouncyCastle.Asn1
             if (0 == (tagHdr & Asn1Tags.Constructed))
                 throw new IOException("indefinite-length primitive encoding encountered");
 
-            IndefiniteLengthInputStream indIn = new IndefiniteLengthInputStream(this, limit);
+            IndefiniteLengthInputStream indIn = new IndefiniteLengthInputStream(s, limit);
             Asn1StreamParser sp = new Asn1StreamParser(indIn, limit, tmpBuffers);
 
             int tagClass = tagHdr & Asn1Tags.Private;