using System; using System.IO; using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1 { // Token: 0x02001E77 RID: 7799 [Token(Token = "0x2001E77")] internal class ConstructedOctetStream : BaseInputStream { // Token: 0x0600C377 RID: 50039 RVA: 0x002C2C50 File Offset: 0x002C0E50 [Token(Token = "0x600C377")] [Address(RVA = "0x23A4150", Offset = "0x23A3150", VA = "0x1823A4150")] internal ConstructedOctetStream(Asn1StreamParser parser) { this._parser = parser; } // Token: 0x0600C378 RID: 50040 RVA: 0x002C2C74 File Offset: 0x002C0E74 [Token(Token = "0x600C378")] [Address(RVA = "0x23A3F20", Offset = "0x23A2F20", VA = "0x1823A3F20", Slot = "27")] public override int Read(byte[] buffer, int offset, int count) { string text2; do { if (this._currentStream == (ulong)0L) { if (!this._first) { return 0; } string text = this._parser.ToString(); if (text == 0) { return 0; } if (text == 0) { continue; } this._first = false; this._currentStream = text; } Stream currentStream = this._currentStream; text2 = this._parser.ToString(); if (text2 == 0) { goto IL_79; } } while (text2 == 0); int num = 0; if (num < 0) { num += num; num++; } this._currentStream = text2; return 0; IL_79: this._currentStream = 0; throw new NullReferenceException(); } // Token: 0x0600C379 RID: 50041 RVA: 0x002C2D08 File Offset: 0x002C0F08 [Token(Token = "0x600C379")] [Address(RVA = "0x23A3D40", Offset = "0x23A2D40", VA = "0x1823A3D40", Slot = "28")] public override int ReadByte() { int num; string text2; do { Stream currentStream = this._currentStream; if (currentStream == 0) { if (this._first == currentStream) { return 0; } string text = this._parser.ToString(); if (text == 0) { return 0; } if (text == 0) { continue; } this._currentStream = text; } num = 0; text2 = this._parser.ToString(); if (text2 == 0) { goto IL_65; } } while (text2 == 0); num += num; num++; this._currentStream = text2; return 0; IL_65: this._currentStream = 0; throw new NullReferenceException(); } // Token: 0x04007B51 RID: 31569 [FieldOffset(Offset = "0x30")] [Token(Token = "0x4007B51")] private readonly Asn1StreamParser _parser; // Token: 0x04007B52 RID: 31570 [FieldOffset(Offset = "0x38")] [Token(Token = "0x4007B52")] private bool _first = true; // Token: 0x04007B53 RID: 31571 [FieldOffset(Offset = "0x40")] [Token(Token = "0x4007B53")] private Stream _currentStream; } }