using System; using System.Runtime.InteropServices; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls { // Token: 0x020015BF RID: 5567 [Token(Token = "0x20015BF")] [StructLayout(3)] public class TlsStreamCipher : TlsCipher { // Token: 0x0600944E RID: 37966 RVA: 0x0020D270 File Offset: 0x0020B470 [Token(Token = "0x600944E")] [Address(RVA = "0x1E0B630", Offset = "0x1E0A030", VA = "0x181E0B630")] 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; 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: 0x0600944F RID: 37967 RVA: 0x0020D300 File Offset: 0x0020B500 [Token(Token = "0x600944F")] [Address(RVA = "0x1E0B510", Offset = "0x1E09F10", VA = "0x181E0B510", Slot = "7")] public virtual int GetPlaintextLimit(int ciphertextLimit) { byte[] macSecret = this.writeMac.MacSecret; return ciphertextLimit; } // Token: 0x06009450 RID: 37968 RVA: 0x0020D320 File Offset: 0x0020B520 [Token(Token = "0x6009450")] [Address(RVA = "0x1E0B390", Offset = "0x1E09D90", VA = "0x181E0B390", 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: 0x06009451 RID: 37969 RVA: 0x0020D36C File Offset: 0x0020B56C [Token(Token = "0x6009451")] [Address(RVA = "0x1E0B1E0", Offset = "0x1E09BE0", VA = "0x181E0B1E0", 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: 0x06009452 RID: 37970 RVA: 0x0020D3A4 File Offset: 0x0020B5A4 [Token(Token = "0x6009452")] [Address(RVA = "0x1E0B0C0", Offset = "0x1E09AC0", VA = "0x181E0B0C0", 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: 0x06009453 RID: 37971 RVA: 0x0020D3C4 File Offset: 0x0020B5C4 [Token(Token = "0x6009453")] [Address(RVA = "0x1E0B550", Offset = "0x1E09F50", VA = "0x181E0B550", Slot = "11")] protected virtual void UpdateIV(IStreamCipher cipher, bool forEncryption, long seqNo) { byte[] array = new byte[8]; int num = 0; TlsUtilities.WriteUint64(seqNo, array, num); int num2; ParametersWithIV parametersWithIV = new ParametersWithIV(num2, array); num2 = 0; throw new NullReferenceException(); } // Token: 0x04006243 RID: 25155 [global::Cpp2IlInjected.FieldOffset(Offset = "0x10")] [Token(Token = "0x4006243")] protected readonly TlsContext context; // Token: 0x04006244 RID: 25156 [global::Cpp2IlInjected.FieldOffset(Offset = "0x18")] [Token(Token = "0x4006244")] protected readonly IStreamCipher encryptCipher; // Token: 0x04006245 RID: 25157 [global::Cpp2IlInjected.FieldOffset(Offset = "0x20")] [Token(Token = "0x4006245")] protected readonly IStreamCipher decryptCipher; // Token: 0x04006246 RID: 25158 [global::Cpp2IlInjected.FieldOffset(Offset = "0x28")] [Token(Token = "0x4006246")] protected readonly TlsMac writeMac; // Token: 0x04006247 RID: 25159 [global::Cpp2IlInjected.FieldOffset(Offset = "0x30")] [Token(Token = "0x4006247")] protected readonly TlsMac readMac; // Token: 0x04006248 RID: 25160 [global::Cpp2IlInjected.FieldOffset(Offset = "0x38")] [Token(Token = "0x4006248")] protected readonly bool usesNonce; } }