using System; using System.Runtime.InteropServices; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings { // Token: 0x02001648 RID: 5704 [Token(Token = "0x2001648")] [StructLayout(3)] public class PaddedBufferedBlockCipher : BufferedBlockCipher { // Token: 0x06009807 RID: 38919 RVA: 0x0021AC78 File Offset: 0x00218E78 [Token(Token = "0x6009807")] [Address(RVA = "0x1DDD300", Offset = "0x1DDBD00", VA = "0x181DDD300")] public PaddedBufferedBlockCipher(IBlockCipher cipher, IBlockCipherPadding padding) { this.cipher = cipher; this.padding = padding; byte[] array = new byte[0]; this.buf = array; this.bufOff = (int)((ulong)0L); } // Token: 0x06009808 RID: 38920 RVA: 0x0021ACB8 File Offset: 0x00218EB8 [Token(Token = "0x6009808")] [Address(RVA = "0x1DDD390", Offset = "0x1DDBD90", VA = "0x181DDD390")] public PaddedBufferedBlockCipher(IBlockCipher cipher) { int num = 0; Pkcs7Padding pkcs7Padding; pkcs7Padding.Init(num); base..ctor(); this.cipher = cipher; this.padding = pkcs7Padding; byte[] array = new byte[pkcs7Padding]; this.buf = array; this.bufOff = (int)((ulong)0L); } // Token: 0x06009809 RID: 38921 RVA: 0x0021AD00 File Offset: 0x00218F00 [Token(Token = "0x6009809")] [Address(RVA = "0x1DDCE10", Offset = "0x1DDB810", VA = "0x181DDCE10", Slot = "23")] public override void Init(bool forEncryption, ICipherParameters parameters) { int num; do { num = 0; this.forEncryption = forEncryption; } while (parameters != 0 && parameters != 0 && parameters == 0); IBlockCipherPadding blockCipherPadding = this.padding; num += num; num++; IBlockCipher cipher = this.cipher; } // Token: 0x0600980A RID: 38922 RVA: 0x0021AD50 File Offset: 0x00218F50 [Token(Token = "0x600980A")] [Address(RVA = "0x1DDCD70", Offset = "0x1DDB770", VA = "0x181DDCD70", Slot = "25")] public override int GetOutputSize(int length) { int num = this.bufOff; byte[] buf = this.buf; num += length; int num2 = buf.Length; if (length != 0) { num2 -= length; return num; } return num; } // Token: 0x0600980B RID: 38923 RVA: 0x0021AD8C File Offset: 0x00218F8C [Token(Token = "0x600980B")] [Address(RVA = "0x1DDCDD0", Offset = "0x1DDB7D0", VA = "0x181DDCDD0", Slot = "26")] public override int GetUpdateOutputSize(int length) { byte[] buf = this.buf; int num = this.bufOff; int length2 = buf.Length; num += length; if (length != 0) { return num - length; } return num - length2; } // Token: 0x0600980C RID: 38924 RVA: 0x0021ADC8 File Offset: 0x00218FC8 [Token(Token = "0x600980C")] [Address(RVA = "0x1DDCFB0", Offset = "0x1DDB9B0", VA = "0x181DDCFB0", Slot = "28")] public override int ProcessByte(byte input, byte[] output, int outOff) { byte[] buf = this.buf; int num = 0; int bufOff = this.bufOff; if (bufOff == buf.Length) { IBlockCipher cipher = this.cipher; } int num2 = bufOff + 1; this.bufOff = num2; return num; } // Token: 0x0600980D RID: 38925 RVA: 0x0021AE0C File Offset: 0x0021900C [Token(Token = "0x600980D")] [Address(RVA = "0x1DDD080", Offset = "0x1DDBA80", VA = "0x181DDD080", Slot = "32")] public override int ProcessBytes(byte[] input, int inOff, int length, byte[] output, int outOff) { int num = this.GetOutputSize(length); if (num > 0) { } byte[] buf = this.buf; int num2 = buf.Length; int bufOff = this.bufOff; num2 -= bufOff; byte[] buf3; int bufOff2; if (length > num2) { Array.Copy(input, inOff, buf, bufOff, num2); IBlockCipher cipher = this.cipher; byte[] buf2 = this.buf; int num3 = 0; this.bufOff = num3; if (length > buf2.Length) { IBlockCipher cipher2 = this.cipher; if (num3 < buf2) { num3 += num3; num3++; } buf3 = this.buf; num += num3; uint num4; num4 += num4; } bufOff2 = this.bufOff; } Array.Copy(input, inOff, buf3, bufOff2, length); return num; } // Token: 0x0600980E RID: 38926 RVA: 0x0021AEC8 File Offset: 0x002190C8 [Token(Token = "0x600980E")] [Address(RVA = "0x1DDCA00", Offset = "0x1DDB400", VA = "0x181DDCA00", Slot = "36")] public override int DoFinal(byte[] output, int outOff) { int num; do { num = 0; IBlockCipher cipher = this.cipher; IBlockCipher cipher2 = this.cipher; byte[] buf = this.buf; this.bufOff = num; IBlockCipherPadding blockCipherPadding = this.padding; byte[] buf2 = this.buf; if (num < cipher2) { num += num; num++; } int num2 = 0; byte[] buf3 = this.buf; num2 += num2; if (num != -1) { } } while (num != 0); int bufOff = this.bufOff; IBlockCipher cipher3 = this.cipher; this.bufOff = num; IBlockCipherPadding blockCipherPadding2 = this.padding; IBlockCipher cipher4 = this.cipher; return num + 0; } // Token: 0x040063FA RID: 25594 [global::Cpp2IlInjected.FieldOffset(Offset = "0x28")] [Token(Token = "0x40063FA")] private readonly IBlockCipherPadding padding; } }