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

173 lines
4.8 KiB
C#

using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001661 RID: 5729
[Token(Token = "0x2001661")]
[StructLayout(3)]
public class OfbBlockCipher : IBlockCipher
{
// Token: 0x060098F2 RID: 39154 RVA: 0x0021FAE0 File Offset: 0x0021DCE0
[Token(Token = "0x60098F2")]
[Address(RVA = "0x1DDB610", Offset = "0x1DDA010", VA = "0x181DDB610")]
public OfbBlockCipher(IBlockCipher cipher, int blockSize)
{
this.cipher = cipher;
this.blockSize = blockSize;
byte[] array = new byte[blockSize];
this.IV = array;
byte[] array2 = new byte[array];
this.ofbV = array2;
byte[] array3 = new byte[array2];
this.ofbOutV = array3;
}
// Token: 0x060098F3 RID: 39155 RVA: 0x0021FB34 File Offset: 0x0021DD34
[Token(Token = "0x60098F3")]
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
public IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x060098F4 RID: 39156 RVA: 0x0021FB48 File Offset: 0x0021DD48
[Token(Token = "0x60098F4")]
[Address(RVA = "0x1DDB170", Offset = "0x1DD9B70", VA = "0x181DDB170", Slot = "5")]
public void Init(bool forEncryption, ICipherParameters parameters)
{
while (parameters != 0 && parameters != 0)
{
if (parameters != 0)
{
byte[] iv = this.IV;
byte[] array;
int length = array.Length;
int length2 = iv.Length;
int num = 0;
int num2 = 0;
Array.Copy(array, num, iv, num2, length2);
break;
}
}
byte[] iv2 = this.IV;
int length3 = iv2.Length;
int num3 = 0;
byte[] array2 = this.ofbV;
int num4 = 0;
Array.Copy(iv2, num4, array2, num3, length3);
IBlockCipher blockCipher = this.cipher;
if (parameters != 0)
{
IBlockCipher blockCipher2 = this.cipher;
}
}
// Token: 0x17001882 RID: 6274
// (get) Token: 0x060098F5 RID: 39157 RVA: 0x0021FC04 File Offset: 0x0021DE04
[Token(Token = "0x17001882")]
public string AlgorithmName
{
[Token(Token = "0x60098F5")]
[Address(RVA = "0x1DDB6F0", Offset = "0x1DDA0F0", VA = "0x181DDB6F0", Slot = "4")]
get
{
IBlockCipher blockCipher = this.cipher;
int num = this.blockSize;
string text;
return text;
}
}
// Token: 0x17001883 RID: 6275
// (get) Token: 0x060098F6 RID: 39158 RVA: 0x0021FC28 File Offset: 0x0021DE28
[Token(Token = "0x17001883")]
public bool IsPartialBlockOkay
{
[Token(Token = "0x60098F6")]
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0", Slot = "7")]
get
{
return true;
}
}
// Token: 0x060098F7 RID: 39159 RVA: 0x0021FC38 File Offset: 0x0021DE38
[Token(Token = "0x60098F7")]
[Address(RVA = "0x4D24F0", Offset = "0x4D0EF0", VA = "0x1804D24F0", Slot = "6")]
public int GetBlockSize()
{
return this.blockSize;
}
// Token: 0x060098F8 RID: 39160 RVA: 0x0021FC4C File Offset: 0x0021DE4C
[Token(Token = "0x60098F8")]
[Address(RVA = "0x1DDB390", Offset = "0x1DD9D90", VA = "0x181DDB390", Slot = "8")]
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
IBlockCipher blockCipher = this.cipher;
byte[] array = this.ofbOutV;
int num = this.blockSize;
if (num > 0)
{
byte[] array2 = this.ofbOutV;
int num2 = this.blockSize;
}
byte[] array3 = this.ofbV;
int num3 = array3.Length;
int num4 = 0;
num3 -= num;
Array.Copy(array3, num, array3, num4, num3);
byte[] array4 = this.ofbV;
int num5 = this.blockSize;
int num6 = 0;
int num7 = array4.Length;
byte[] array5 = this.ofbOutV;
num7 -= num5;
Array.Copy(array5, num6, array4, num7, num5);
return this.blockSize;
}
// Token: 0x060098F9 RID: 39161 RVA: 0x0021FCF4 File Offset: 0x0021DEF4
[Token(Token = "0x60098F9")]
[Address(RVA = "0x1DDB5A0", Offset = "0x1DD9FA0", VA = "0x181DDB5A0", Slot = "9")]
public void Reset()
{
byte[] iv = this.IV;
int length = iv.Length;
int num = 0;
byte[] array = this.ofbV;
int num2 = 0;
Array.Copy(iv, num2, array, num, length);
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x04006486 RID: 25734
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006486")]
private byte[] IV;
// Token: 0x04006487 RID: 25735
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006487")]
private byte[] ofbV;
// Token: 0x04006488 RID: 25736
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006488")]
private byte[] ofbOutV;
// Token: 0x04006489 RID: 25737
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006489")]
private readonly int blockSize;
// Token: 0x0400648A RID: 25738
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x400648A")]
private readonly IBlockCipher cipher;
}
}