Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Crypto/Modes/CfbBlockCipher.cs
T
2026-04-08 23:40:05 +02:00

224 lines
6.2 KiB
C#

using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001657 RID: 5719
[Token(Token = "0x2001657")]
[StructLayout(3)]
public class CfbBlockCipher : IBlockCipher
{
// Token: 0x06009861 RID: 39009 RVA: 0x0021C498 File Offset: 0x0021A698
[Token(Token = "0x6009861")]
[Address(RVA = "0x20E8170", Offset = "0x20E6B70", VA = "0x1820E8170")]
public CfbBlockCipher(IBlockCipher cipher, int bitBlockSize)
{
this.cipher = cipher;
this.blockSize = bitBlockSize;
byte[] array = new byte[bitBlockSize];
this.IV = array;
byte[] array2 = new byte[array];
this.cfbV = array2;
byte[] array3 = new byte[array2];
this.cfbOutV = array3;
}
// Token: 0x06009862 RID: 39010 RVA: 0x0021C4EC File Offset: 0x0021A6EC
[Token(Token = "0x6009862")]
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
public IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x06009863 RID: 39011 RVA: 0x0021C500 File Offset: 0x0021A700
[Token(Token = "0x6009863")]
[Address(RVA = "0x20E7F10", Offset = "0x20E6910", VA = "0x1820E7F10", Slot = "5")]
public void Init(bool forEncryption, ICipherParameters parameters)
{
do
{
this.encrypting = forEncryption;
if (parameters == 0 || parameters == 0)
{
goto IL_5B;
}
}
while (parameters == 0);
byte[] iv = this.IV;
byte[] array;
int length = array.Length;
int num = 0;
int num2 = iv.Length;
num2 -= length;
Array.Copy(array, num, iv, num2, length);
byte[] iv2 = this.IV;
int num3 = 0;
Array.Clear(iv2, num3, num2);
IL_5B:
byte[] iv3 = this.IV;
int length2 = iv3.Length;
int num4 = 0;
byte[] array2 = this.cfbV;
int num5 = 0;
Array.Copy(iv3, num5, array2, num4, length2);
IBlockCipher blockCipher = this.cipher;
if (parameters != 0)
{
IBlockCipher blockCipher2 = this.cipher;
}
}
// Token: 0x17001877 RID: 6263
// (get) Token: 0x06009864 RID: 39012 RVA: 0x0021C5B0 File Offset: 0x0021A7B0
[Token(Token = "0x17001877")]
public string AlgorithmName
{
[Token(Token = "0x6009864")]
[Address(RVA = "0x20E8250", Offset = "0x20E6C50", VA = "0x1820E8250", Slot = "4")]
get
{
IBlockCipher blockCipher = this.cipher;
int num = this.blockSize;
string text;
return text;
}
}
// Token: 0x17001878 RID: 6264
// (get) Token: 0x06009865 RID: 39013 RVA: 0x0021C5D4 File Offset: 0x0021A7D4
[Token(Token = "0x17001878")]
public bool IsPartialBlockOkay
{
[Token(Token = "0x6009865")]
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0", Slot = "7")]
get
{
return true;
}
}
// Token: 0x06009866 RID: 39014 RVA: 0x0021C5E4 File Offset: 0x0021A7E4
[Token(Token = "0x6009866")]
[Address(RVA = "0x4CCC20", Offset = "0x4CB620", VA = "0x1804CCC20", Slot = "6")]
public int GetBlockSize()
{
return this.blockSize;
}
// Token: 0x06009867 RID: 39015 RVA: 0x0021C5F8 File Offset: 0x0021A7F8
[Token(Token = "0x6009867")]
[Address(RVA = "0x20E80D0", Offset = "0x20E6AD0", VA = "0x1820E80D0", Slot = "8")]
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
if (this.encrypting)
{
int num;
return num;
}
int num2;
return num2;
}
// Token: 0x06009868 RID: 39016 RVA: 0x0021C614 File Offset: 0x0021A814
[Token(Token = "0x6009868")]
[Address(RVA = "0x20E7CF0", Offset = "0x20E66F0", VA = "0x1820E7CF0")]
public int EncryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
{
IBlockCipher blockCipher = this.cipher;
byte[] array = this.cfbOutV;
byte[] array2 = this.cfbV;
int num = this.blockSize;
if (num > 0)
{
byte[] array3 = this.cfbOutV;
int num2 = this.blockSize;
}
byte[] array4 = this.cfbV;
int num3 = array4.Length;
int num4 = 0;
num3 -= num;
Array.Copy(array4, num, array4, num4, num3);
byte[] array5 = this.cfbV;
int num5 = this.blockSize;
int num6 = array5.Length;
num6 -= num5;
return this.blockSize;
}
// Token: 0x06009869 RID: 39017 RVA: 0x0021C6AC File Offset: 0x0021A8AC
[Token(Token = "0x6009869")]
[Address(RVA = "0x20E7AE0", Offset = "0x20E64E0", VA = "0x1820E7AE0")]
public int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
{
IBlockCipher blockCipher = this.cipher;
byte[] array = this.cfbOutV;
byte[] array2 = this.cfbV;
int num = array2.Length;
int num2 = 0;
int num3 = this.blockSize;
num -= num3;
Array.Copy(array2, num3, array2, num2, num);
byte[] array3 = this.cfbV;
int num4 = this.blockSize;
int num5 = array3.Length;
num5 -= num4;
Array.Copy(input, inOff, array3, num5, num4);
int num6 = this.blockSize;
if (num6 > 0)
{
byte[] array4 = this.cfbOutV;
num6 = num4;
int num7 = this.blockSize;
}
return num6;
}
// Token: 0x0600986A RID: 39018 RVA: 0x0021C758 File Offset: 0x0021A958
[Token(Token = "0x600986A")]
[Address(RVA = "0x20E8100", Offset = "0x20E6B00", VA = "0x1820E8100", Slot = "9")]
public void Reset()
{
byte[] iv = this.IV;
int length = iv.Length;
int num = 0;
byte[] array = this.cfbV;
int num2 = 0;
Array.Copy(iv, num2, array, num, length);
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x0400641B RID: 25627
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x400641B")]
private byte[] IV;
// Token: 0x0400641C RID: 25628
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x400641C")]
private byte[] cfbV;
// Token: 0x0400641D RID: 25629
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x400641D")]
private byte[] cfbOutV;
// Token: 0x0400641E RID: 25630
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x400641E")]
private bool encrypting;
// Token: 0x0400641F RID: 25631
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
[Token(Token = "0x400641F")]
private readonly int blockSize;
// Token: 0x04006420 RID: 25632
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006420")]
private readonly IBlockCipher cipher;
}
}