159 lines
4.4 KiB
C#
159 lines
4.4 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
|
{
|
|
// Token: 0x02001D2B RID: 7467
|
|
[Token(Token = "0x2001D2B")]
|
|
internal class MacCFBBlockCipher : IBlockCipher
|
|
{
|
|
// Token: 0x0600B902 RID: 47362 RVA: 0x0028212C File Offset: 0x0028032C
|
|
[Token(Token = "0x600B902")]
|
|
[Address(RVA = "0x25BE6D0", Offset = "0x25BD6D0", VA = "0x1825BE6D0")]
|
|
public MacCFBBlockCipher(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: 0x0600B903 RID: 47363 RVA: 0x00282180 File Offset: 0x00280380
|
|
[Token(Token = "0x600B903")]
|
|
[Address(RVA = "0x25BE2A0", Offset = "0x25BD2A0", VA = "0x1825BE2A0", 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 num = iv.Length;
|
|
num = length;
|
|
num -= length;
|
|
int num2 = 0;
|
|
Array.Copy(array, num2, iv, num, num);
|
|
break;
|
|
}
|
|
}
|
|
byte[] iv2 = this.IV;
|
|
byte[] array2 = this.cfbV;
|
|
IBlockCipher blockCipher = this.cipher;
|
|
IBlockCipher blockCipher2 = this.cipher;
|
|
}
|
|
|
|
// Token: 0x17001D28 RID: 7464
|
|
// (get) Token: 0x0600B904 RID: 47364 RVA: 0x002821F8 File Offset: 0x002803F8
|
|
[Token(Token = "0x17001D28")]
|
|
public string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600B904")]
|
|
[Address(RVA = "0x25BE7B0", Offset = "0x25BD7B0", VA = "0x1825BE7B0", Slot = "4")]
|
|
get
|
|
{
|
|
IBlockCipher blockCipher = this.cipher;
|
|
int num = this.blockSize;
|
|
string text;
|
|
return text;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001D29 RID: 7465
|
|
// (get) Token: 0x0600B905 RID: 47365 RVA: 0x0028221C File Offset: 0x0028041C
|
|
[Token(Token = "0x17001D29")]
|
|
public bool IsPartialBlockOkay
|
|
{
|
|
[Token(Token = "0x600B905")]
|
|
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "7")]
|
|
get
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B906 RID: 47366 RVA: 0x0028222C File Offset: 0x0028042C
|
|
[Token(Token = "0x600B906")]
|
|
[Address(RVA = "0x471180", Offset = "0x470180", VA = "0x180471180", Slot = "6")]
|
|
public int GetBlockSize()
|
|
{
|
|
return this.blockSize;
|
|
}
|
|
|
|
// Token: 0x0600B907 RID: 47367 RVA: 0x00282240 File Offset: 0x00280440
|
|
[Token(Token = "0x600B907")]
|
|
[Address(RVA = "0x25BE440", Offset = "0x25BD440", VA = "0x1825BE440", Slot = "8")]
|
|
public int ProcessBlock(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: 0x0600B908 RID: 47368 RVA: 0x002822D8 File Offset: 0x002804D8
|
|
[Token(Token = "0x600B908")]
|
|
[Address(RVA = "0x25BE660", Offset = "0x25BD660", VA = "0x1825BE660", Slot = "9")]
|
|
public void Reset()
|
|
{
|
|
byte[] iv = this.IV;
|
|
byte[] array = this.cfbV;
|
|
IBlockCipher blockCipher = this.cipher;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600B909 RID: 47369 RVA: 0x00282304 File Offset: 0x00280504
|
|
[Token(Token = "0x600B909")]
|
|
[Address(RVA = "0x25BE230", Offset = "0x25BD230", VA = "0x1825BE230")]
|
|
public void GetMacBlock(byte[] mac)
|
|
{
|
|
IBlockCipher blockCipher = this.cipher;
|
|
}
|
|
|
|
// Token: 0x040074AE RID: 29870
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40074AE")]
|
|
private byte[] IV;
|
|
|
|
// Token: 0x040074AF RID: 29871
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40074AF")]
|
|
private byte[] cfbV;
|
|
|
|
// Token: 0x040074B0 RID: 29872
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40074B0")]
|
|
private byte[] cfbOutV;
|
|
|
|
// Token: 0x040074B1 RID: 29873
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40074B1")]
|
|
private readonly int blockSize;
|
|
|
|
// Token: 0x040074B2 RID: 29874
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40074B2")]
|
|
private readonly IBlockCipher cipher;
|
|
}
|
|
}
|