using System; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls { // Token: 0x02001B9C RID: 7068 [Token(Token = "0x2001B9C")] public class TlsStreamCipher : TlsCipher { // Token: 0x0600B028 RID: 45096 RVA: 0x0026489C File Offset: 0x00262A9C [Token(Token = "0x600B028")] [Address(RVA = "0x182C980", Offset = "0x182B780", VA = "0x18182C980")] public TlsStreamCipher(TlsContext context, IStreamCipher clientWriteCipher, IStreamCipher serverWriteCipher, IDigest clientWriteDigest, IDigest serverWriteDigest, int cipherKeySize, bool usesNonce) { this.usesNonce = false; this.context = context; this.encryptCipher = clientWriteCipher; this.decryptCipher = serverWriteCipher; bool flag; if (!flag) { } int num = 0; TlsMac tlsMac; num += tlsMac; this.writeMac = tlsMac; TlsMac tlsMac2; this.readMac = tlsMac2; this.encryptCipher = serverWriteCipher; this.decryptCipher = clientWriteCipher; byte[] array = new byte[8]; KeyParameter keyParameter; ParametersWithIV parametersWithIV = new ParametersWithIV(keyParameter, array); KeyParameter keyParameter2; ParametersWithIV parametersWithIV2 = new ParametersWithIV(keyParameter2, array); IStreamCipher streamCipher = this.encryptCipher; IStreamCipher streamCipher2 = this.decryptCipher; throw new NullReferenceException(); } // Token: 0x0600B029 RID: 45097 RVA: 0x00264934 File Offset: 0x00262B34 [Token(Token = "0x600B029")] [Address(RVA = "0x182C750", Offset = "0x182B550", VA = "0x18182C750", Slot = "7")] public virtual int GetPlaintextLimit(int ciphertextLimit) { byte[] macSecret = this.writeMac.MacSecret; return ciphertextLimit; } // Token: 0x0600B02A RID: 45098 RVA: 0x00264954 File Offset: 0x00262B54 [Token(Token = "0x600B02A")] [Address(RVA = "0x182C5D0", Offset = "0x182B3D0", VA = "0x18182C5D0", Slot = "8")] public virtual byte[] EncodePlaintext(long seqNo, byte type, byte[] plaintext, int offset, int len) { if (this.usesNonce) { } byte[] macSecret = this.writeMac.MacSecret; byte[] array = new byte[0]; IStreamCipher streamCipher = this.encryptCipher; int size = this.writeMac.Size; IStreamCipher streamCipher2 = this.encryptCipher; return array; } // Token: 0x0600B02B RID: 45099 RVA: 0x002649A0 File Offset: 0x00262BA0 [Token(Token = "0x600B02B")] [Address(RVA = "0x182C420", Offset = "0x182B220", VA = "0x18182C420", Slot = "9")] public virtual byte[] DecodeCiphertext(long seqNo, byte type, byte[] ciphertext, int offset, int len) { if (this.usesNonce) { } byte[] macSecret = this.readMac.MacSecret; byte[] array = new byte[0]; IStreamCipher streamCipher = this.decryptCipher; byte[] array2; return array2; } // Token: 0x0600B02C RID: 45100 RVA: 0x002649D8 File Offset: 0x00262BD8 [Token(Token = "0x600B02C")] [Address(RVA = "0x182C300", Offset = "0x182B100", VA = "0x18182C300", Slot = "10")] protected virtual void CheckMac(long seqNo, byte type, byte[] recBuf, int recStart, int recEnd, byte[] calcBuf, int calcOff, int calcLen) { bool flag; do { int size = this.readMac.Size; } while (!flag); } // Token: 0x0600B02D RID: 45101 RVA: 0x002649F8 File Offset: 0x00262BF8 [Token(Token = "0x600B02D")] [Address(RVA = "0x182C790", Offset = "0x182B590", VA = "0x18182C790", Slot = "11")] protected virtual void UpdateIV(IStreamCipher cipher, bool forEncryption, long seqNo) { byte[] array = new byte[8]; array[0] = (byte)seqNo; array[0] = (byte)seqNo; array[0] = (byte)seqNo; array[0] = (byte)seqNo; array[0] = (byte)seqNo; array[0] = (byte)seqNo; array[0] = (byte)seqNo; array[0] = (byte)seqNo; int num; ParametersWithIV parametersWithIV = new ParametersWithIV(num, array); num = 0; throw new NullReferenceException(); } // Token: 0x04007086 RID: 28806 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007086")] protected readonly TlsContext context; // Token: 0x04007087 RID: 28807 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4007087")] protected readonly IStreamCipher encryptCipher; // Token: 0x04007088 RID: 28808 [FieldOffset(Offset = "0x20")] [Token(Token = "0x4007088")] protected readonly IStreamCipher decryptCipher; // Token: 0x04007089 RID: 28809 [FieldOffset(Offset = "0x28")] [Token(Token = "0x4007089")] protected readonly TlsMac writeMac; // Token: 0x0400708A RID: 28810 [FieldOffset(Offset = "0x30")] [Token(Token = "0x400708A")] protected readonly TlsMac readMac; // Token: 0x0400708B RID: 28811 [FieldOffset(Offset = "0x38")] [Token(Token = "0x400708B")] protected readonly bool usesNonce; } }