m
This commit is contained in:
+170
@@ -0,0 +1,170 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D1E RID: 7454
|
||||
[Token(Token = "0x2001D1E")]
|
||||
public class OfbBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B89A RID: 47258 RVA: 0x00280294 File Offset: 0x0027E494
|
||||
[Token(Token = "0x600B89A")]
|
||||
[Address(RVA = "0x22E10D0", Offset = "0x22E00D0", VA = "0x1822E10D0")]
|
||||
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: 0x0600B89B RID: 47259 RVA: 0x002802E8 File Offset: 0x0027E4E8
|
||||
[Token(Token = "0x600B89B")]
|
||||
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B89C RID: 47260 RVA: 0x002802FC File Offset: 0x0027E4FC
|
||||
[Token(Token = "0x600B89C")]
|
||||
[Address(RVA = "0x22E0C30", Offset = "0x22DFC30", VA = "0x1822E0C30", 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: 0x17001D20 RID: 7456
|
||||
// (get) Token: 0x0600B89D RID: 47261 RVA: 0x002803B8 File Offset: 0x0027E5B8
|
||||
[Token(Token = "0x17001D20")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B89D")]
|
||||
[Address(RVA = "0x22E11B0", Offset = "0x22E01B0", VA = "0x1822E11B0", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D21 RID: 7457
|
||||
// (get) Token: 0x0600B89E RID: 47262 RVA: 0x002803DC File Offset: 0x0027E5DC
|
||||
[Token(Token = "0x17001D21")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B89E")]
|
||||
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B89F RID: 47263 RVA: 0x002803EC File Offset: 0x0027E5EC
|
||||
[Token(Token = "0x600B89F")]
|
||||
[Address(RVA = "0x471180", Offset = "0x470180", VA = "0x180471180", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8A0 RID: 47264 RVA: 0x00280400 File Offset: 0x0027E600
|
||||
[Token(Token = "0x600B8A0")]
|
||||
[Address(RVA = "0x22E0E50", Offset = "0x22DFE50", VA = "0x1822E0E50", 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: 0x0600B8A1 RID: 47265 RVA: 0x002804A8 File Offset: 0x0027E6A8
|
||||
[Token(Token = "0x600B8A1")]
|
||||
[Address(RVA = "0x22E1060", Offset = "0x22E0060", VA = "0x1822E1060", 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: 0x04007482 RID: 29826
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007482")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x04007483 RID: 29827
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007483")]
|
||||
private byte[] ofbV;
|
||||
|
||||
// Token: 0x04007484 RID: 29828
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007484")]
|
||||
private byte[] ofbOutV;
|
||||
|
||||
// Token: 0x04007485 RID: 29829
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007485")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x04007486 RID: 29830
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007486")]
|
||||
private readonly IBlockCipher cipher;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user