oh dear
This commit is contained in:
+222
@@ -0,0 +1,222 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C32 RID: 7218
|
||||
[Token(Token = "0x2001C32")]
|
||||
public sealed class CbcBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B41D RID: 46109 RVA: 0x00273124 File Offset: 0x00271324
|
||||
[Token(Token = "0x600B41D")]
|
||||
[Address(RVA = "0x1C1BBA0", Offset = "0x1C1A9A0", VA = "0x181C1BBA0")]
|
||||
public CbcBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[0];
|
||||
int num = this.blockSize;
|
||||
this.IV = array;
|
||||
byte[] array2 = new byte[num];
|
||||
int num2 = this.blockSize;
|
||||
this.cbcV = array2;
|
||||
byte[] array3 = new byte[num2];
|
||||
this.cbcNextV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B41E RID: 46110 RVA: 0x00273180 File Offset: 0x00271380
|
||||
[Token(Token = "0x600B41E")]
|
||||
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B41F RID: 46111 RVA: 0x00273194 File Offset: 0x00271394
|
||||
[Token(Token = "0x600B41F")]
|
||||
[Address(RVA = "0x1C1B630", Offset = "0x1C1A430", VA = "0x181C1B630", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B41F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CbcBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_C0:
|
||||
stloc:ArgumentException(var_20_CA, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("initialisation vector must be the same length as block size")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x17001C75 RID: 7285
|
||||
// (get) Token: 0x0600B420 RID: 46112 RVA: 0x0027326C File Offset: 0x0027146C
|
||||
[Token(Token = "0x17001C75")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B420")]
|
||||
[Address(RVA = "0x1C1BC40", Offset = "0x1C1AA40", VA = "0x181C1BC40", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/CBC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001C76 RID: 7286
|
||||
// (get) Token: 0x0600B421 RID: 46113 RVA: 0x00273294 File Offset: 0x00271494
|
||||
[Token(Token = "0x17001C76")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B421")]
|
||||
[Address(RVA = "0x403930", Offset = "0x402730", VA = "0x180403930", Slot = "7")]
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B422 RID: 46114 RVA: 0x002732A4 File Offset: 0x002714A4
|
||||
[Token(Token = "0x600B422")]
|
||||
[Address(RVA = "0x1C1B5E0", Offset = "0x1C1A3E0", VA = "0x181C1B5E0", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B423 RID: 46115 RVA: 0x002732C0 File Offset: 0x002714C0
|
||||
[Token(Token = "0x600B423")]
|
||||
[Address(RVA = "0x1C1B860", Offset = "0x1C1A660", VA = "0x181C1B860", Slot = "8")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
if (this.encrypting)
|
||||
{
|
||||
int num = this.blockSize;
|
||||
int num2 = 0;
|
||||
if (num > 0)
|
||||
{
|
||||
byte[] array = this.cbcV;
|
||||
num2 += array;
|
||||
num2++;
|
||||
}
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int length = this.cbcV.Length;
|
||||
return inOff;
|
||||
}
|
||||
int num3 = this.blockSize;
|
||||
byte[] array2 = this.cbcNextV;
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
Array.Copy(input, inOff, array2, num5, num3);
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
if (this.blockSize > num4)
|
||||
{
|
||||
byte[] array3 = this.cbcV;
|
||||
num4++;
|
||||
}
|
||||
byte[] array4 = this.cbcNextV;
|
||||
byte[] array5 = this.cbcV;
|
||||
this.cbcV = array4;
|
||||
this.cbcNextV = array5;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B424 RID: 46116 RVA: 0x00273370 File Offset: 0x00271570
|
||||
[Token(Token = "0x600B424")]
|
||||
[Address(RVA = "0x1C1BB10", Offset = "0x1C1A910", VA = "0x181C1BB10", Slot = "9")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] iv = this.IV;
|
||||
int length = iv.Length;
|
||||
int num = 0;
|
||||
byte[] array = this.cbcV;
|
||||
int num2 = 0;
|
||||
Array.Copy(iv, num2, array, num, length);
|
||||
byte[] array2 = this.cbcNextV;
|
||||
int length2 = array2.Length;
|
||||
int num3 = 0;
|
||||
Array.Clear(array2, num3, length2);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B425 RID: 46117 RVA: 0x002733D0 File Offset: 0x002715D0
|
||||
[Token(Token = "0x600B425")]
|
||||
[Address(RVA = "0x1C1B470", Offset = "0x1C1A270", VA = "0x181C1B470")]
|
||||
private int EncryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num = this.blockSize;
|
||||
int num2 = 0;
|
||||
if (num > 0)
|
||||
{
|
||||
byte[] array = this.cbcV;
|
||||
num2 += array;
|
||||
num2++;
|
||||
}
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int length = this.cbcV.Length;
|
||||
return inOff;
|
||||
}
|
||||
|
||||
// Token: 0x0600B426 RID: 46118 RVA: 0x00273414 File Offset: 0x00271614
|
||||
[Token(Token = "0x600B426")]
|
||||
[Address(RVA = "0x1C1B300", Offset = "0x1C1A100", VA = "0x181C1B300")]
|
||||
private int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num = this.blockSize;
|
||||
byte[] array = this.cbcNextV;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(input, inOff, array, num3, num);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
if (this.blockSize > num2)
|
||||
{
|
||||
byte[] array2 = this.cbcV;
|
||||
num2++;
|
||||
}
|
||||
byte[] array3 = this.cbcNextV;
|
||||
byte[] array4 = this.cbcV;
|
||||
this.cbcV = array3;
|
||||
this.cbcNextV = array4;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0400724E RID: 29262
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400724E")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x0400724F RID: 29263
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400724F")]
|
||||
private byte[] cbcV;
|
||||
|
||||
// Token: 0x04007250 RID: 29264
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007250")]
|
||||
private byte[] cbcNextV;
|
||||
|
||||
// Token: 0x04007251 RID: 29265
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007251")]
|
||||
private int blockSize;
|
||||
|
||||
// Token: 0x04007252 RID: 29266
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007252")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x04007253 RID: 29267
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007253")]
|
||||
private bool encrypting;
|
||||
}
|
||||
}
|
||||
+385
@@ -0,0 +1,385 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C33 RID: 7219
|
||||
[Token(Token = "0x2001C33")]
|
||||
public class CcmBlockCipher : IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x0600B427 RID: 46119 RVA: 0x00273480 File Offset: 0x00271680
|
||||
[Token(Token = "0x600B427")]
|
||||
[Address(RVA = "0x1C1D1A0", Offset = "0x1C1BFA0", VA = "0x181C1D1A0")]
|
||||
public CcmBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
this.associatedText = memoryStream;
|
||||
MemoryStream memoryStream2 = new MemoryStream();
|
||||
this.data = memoryStream2;
|
||||
base..ctor();
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[CcmBlockCipher.BlockSize];
|
||||
this.macBlock = array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B428 RID: 46120 RVA: 0x002734DC File Offset: 0x002716DC
|
||||
[Token(Token = "0x600B428")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "17")]
|
||||
public virtual IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B429 RID: 46121 RVA: 0x002734F0 File Offset: 0x002716F0
|
||||
[Token(Token = "0x600B429")]
|
||||
[Address(RVA = "0x1C1C440", Offset = "0x1C1B240", VA = "0x181C1C440", Slot = "18")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B429)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CcmBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_78:
|
||||
stloc:ArgumentException(var_11_82, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("invalid parameters passed to CCM")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x17001C77 RID: 7287
|
||||
// (get) Token: 0x0600B42A RID: 46122 RVA: 0x00273580 File Offset: 0x00271780
|
||||
[Token(Token = "0x17001C77")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B42A")]
|
||||
[Address(RVA = "0x1C1D330", Offset = "0x1C1C130", VA = "0x181C1D330", Slot = "19")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/CCM";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B42B RID: 46123 RVA: 0x002735A8 File Offset: 0x002717A8
|
||||
[Token(Token = "0x600B42B")]
|
||||
[Address(RVA = "0x1C1C2C0", Offset = "0x1C1B0C0", VA = "0x181C1C2C0", Slot = "20")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B42C RID: 46124 RVA: 0x002735C4 File Offset: 0x002717C4
|
||||
[Token(Token = "0x600B42C")]
|
||||
[Address(RVA = "0x1C1C6D0", Offset = "0x1C1B4D0", VA = "0x181C1C6D0", Slot = "21")]
|
||||
public virtual void ProcessAadByte(byte input)
|
||||
{
|
||||
((IDisposable)this.associatedText).Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x0600B42D RID: 46125 RVA: 0x002735E4 File Offset: 0x002717E4
|
||||
[Token(Token = "0x600B42D")]
|
||||
[Address(RVA = "0x1C1C700", Offset = "0x1C1B500", VA = "0x181C1C700", Slot = "22")]
|
||||
public virtual void ProcessAadBytes(byte[] inBytes, int inOff, int len)
|
||||
{
|
||||
int num = this.associatedText.Read(inBytes, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B42E RID: 46126 RVA: 0x00273608 File Offset: 0x00271808
|
||||
[Token(Token = "0x600B42E")]
|
||||
[Address(RVA = "0x1C1C730", Offset = "0x1C1B530", VA = "0x181C1C730", Slot = "23")]
|
||||
public virtual int ProcessByte(byte input, byte[] outBytes, int outOff)
|
||||
{
|
||||
MemoryStream memoryStream = this.data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600B42F RID: 46127 RVA: 0x00273624 File Offset: 0x00271824
|
||||
[Token(Token = "0x600B42F")]
|
||||
[Address(RVA = "0x1C1C760", Offset = "0x1C1B560", VA = "0x181C1C760", Slot = "24")]
|
||||
public virtual int ProcessBytes(byte[] inBytes, int inOff, int inLen, byte[] outBytes, int outOff)
|
||||
{
|
||||
Check.DataLength(inBytes, inOff, inOff, "Input buffer too short");
|
||||
int num = this.data.ReadByte();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600B430 RID: 46128 RVA: 0x00273654 File Offset: 0x00271854
|
||||
[Token(Token = "0x600B430")]
|
||||
[Address(RVA = "0x1C1C1B0", Offset = "0x1C1AFB0", VA = "0x181C1C1B0", Slot = "25")]
|
||||
public virtual int DoFinal(byte[] outBytes, int outOff)
|
||||
{
|
||||
MemoryStream memoryStream = this.data;
|
||||
long length = this.data.Length;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B431 RID: 46129 RVA: 0x0027367C File Offset: 0x0027187C
|
||||
[Token(Token = "0x600B431")]
|
||||
[Address(RVA = "0x1C1D0E0", Offset = "0x1C1BEE0", VA = "0x181C1D0E0", Slot = "26")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
MemoryStream memoryStream = this.associatedText;
|
||||
((IDisposable)this.data).Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x0600B432 RID: 46130 RVA: 0x002736A8 File Offset: 0x002718A8
|
||||
[Token(Token = "0x600B432")]
|
||||
[Address(RVA = "0x1C1C310", Offset = "0x1C1B110", VA = "0x181C1C310", Slot = "27")]
|
||||
public virtual byte[] GetMac()
|
||||
{
|
||||
byte[] array = this.macBlock;
|
||||
int num = this.macSize;
|
||||
int num2 = 0;
|
||||
return Arrays.CopyOfRange(array, num2, num);
|
||||
}
|
||||
|
||||
// Token: 0x0600B433 RID: 46131 RVA: 0x002736D0 File Offset: 0x002718D0
|
||||
[Token(Token = "0x600B433")]
|
||||
[Address(RVA = "0x43E630", Offset = "0x43D430", VA = "0x18043E630", Slot = "28")]
|
||||
public virtual int GetUpdateOutputSize(int len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600B434 RID: 46132 RVA: 0x002736E0 File Offset: 0x002718E0
|
||||
[Token(Token = "0x600B434")]
|
||||
[Address(RVA = "0x1C1C380", Offset = "0x1C1B180", VA = "0x181C1C380", Slot = "29")]
|
||||
public virtual int GetOutputSize(int len)
|
||||
{
|
||||
bool flag = this.data.CanWrite;
|
||||
int num = this.macSize;
|
||||
flag = (flag ? 1 : 0) + len != 0;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
if ((flag ? 1 : 0) < num)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
flag = (flag ? 1 : 0) - num != 0;
|
||||
}
|
||||
flag = (flag ? 1 : 0) + num != 0;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B435 RID: 46133 RVA: 0x00273720 File Offset: 0x00271920
|
||||
[Token(Token = "0x600B435")]
|
||||
[Address(RVA = "0x1C1CFF0", Offset = "0x1C1BDF0", VA = "0x181C1CFF0", Slot = "30")]
|
||||
public virtual byte[] ProcessPacket(byte[] input, int inOff, int inLen)
|
||||
{
|
||||
int num = this.macSize;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
}
|
||||
byte[] array = new byte[input];
|
||||
byte[] array2 = this.ProcessPacket(input, inOff, inLen);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B436 RID: 46134 RVA: 0x0027375C File Offset: 0x0027195C
|
||||
[Token(Token = "0x600B436")]
|
||||
[Address(RVA = "0x1C1C800", Offset = "0x1C1B600", VA = "0x181C1C800", Slot = "31")]
|
||||
public virtual int ProcessPacket(byte[] input, int inOff, int inLen, byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B436)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CcmBlockCipher::ProcessPacket(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_11D:
|
||||
stloc:InvalidCipherTextException(var_24_127, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in CCM failed")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B437 RID: 46135 RVA: 0x00273894 File Offset: 0x00271A94
|
||||
[Token(Token = "0x600B437")]
|
||||
[Address(RVA = "0x1C1BCA0", Offset = "0x1C1AAA0", VA = "0x181C1BCA0")]
|
||||
private int CalculateMac(byte[] data, int dataOff, int dataLen, byte[] macBlock)
|
||||
{
|
||||
int num;
|
||||
CbcBlockCipherMac cbcBlockCipherMac = new CbcBlockCipherMac(this.cipher, dataOff, num);
|
||||
num = 0;
|
||||
byte[] array = new byte[16];
|
||||
bool flag = this.associatedText.CanWrite;
|
||||
byte[] array2 = this.initialAssociatedText;
|
||||
if (array2 == 0)
|
||||
{
|
||||
}
|
||||
int length = array2.Length;
|
||||
flag = (flag ? 1 : 0) + length != 0;
|
||||
if (flag > false)
|
||||
{
|
||||
}
|
||||
uint num2;
|
||||
flag = (flag ? 1U : 0U) - num2 != 0U;
|
||||
flag = flag - typeof(IMac).TypeHandle != null;
|
||||
array[0] = (flag ? 1 : 0);
|
||||
byte[] array3 = this.nonce;
|
||||
uint num3;
|
||||
array[0] = (byte)num3;
|
||||
byte[] array4 = this.nonce;
|
||||
int length2 = array4.Length;
|
||||
int num4 = 0;
|
||||
uint num5;
|
||||
Array.Copy(array4, num4, array, (int)num5, length2);
|
||||
if (dataLen > 0)
|
||||
{
|
||||
int num6 = array.Length;
|
||||
num6 -= (int)num5;
|
||||
num5 += (uint)1;
|
||||
}
|
||||
int length3 = array.Length;
|
||||
bool flag2 = this.associatedText.CanWrite;
|
||||
byte[] array5 = this.initialAssociatedText;
|
||||
int num7 = 0;
|
||||
if (array5 == 0)
|
||||
{
|
||||
}
|
||||
flag2 = (flag2 ? 1 : 0) + num7 != 0;
|
||||
if (flag2 > false)
|
||||
{
|
||||
bool canWrite = this.associatedText.CanWrite;
|
||||
if (this.initialAssociatedText == 0)
|
||||
{
|
||||
}
|
||||
byte[] array6 = this.initialAssociatedText;
|
||||
if (array6 != 0)
|
||||
{
|
||||
int length4 = array6.Length;
|
||||
}
|
||||
long length5 = this.associatedText.Length;
|
||||
MemoryStream memoryStream = this.associatedText;
|
||||
MemoryStream memoryStream2 = this.associatedText;
|
||||
long length6 = memoryStream2.Length;
|
||||
int num8 = 0;
|
||||
if (memoryStream2 < 0)
|
||||
{
|
||||
}
|
||||
uint num9;
|
||||
if (length6 < (long)num9)
|
||||
{
|
||||
num9 = (uint)((long)num9 - length6);
|
||||
if (num8 < cbcBlockCipherMac)
|
||||
{
|
||||
num8 += num8;
|
||||
num8++;
|
||||
}
|
||||
while (num8 != cbcBlockCipherMac)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
int num10 = 0;
|
||||
num10 += 3;
|
||||
num10 += 19;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B438 RID: 46136 RVA: 0x00273A24 File Offset: 0x00271C24
|
||||
[Token(Token = "0x600B438")]
|
||||
[Address(RVA = "0x1C1C270", Offset = "0x1C1B070", VA = "0x181C1C270")]
|
||||
private int GetAssociatedTextLength()
|
||||
{
|
||||
bool flag = this.associatedText.CanWrite;
|
||||
byte[] array = this.initialAssociatedText;
|
||||
if (array == 0)
|
||||
{
|
||||
flag = flag + array != null;
|
||||
}
|
||||
int length = array.Length;
|
||||
flag = (flag ? 1 : 0) + length != 0;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B439 RID: 46137 RVA: 0x00273A5C File Offset: 0x00271C5C
|
||||
[Token(Token = "0x600B439")]
|
||||
[Address(RVA = "0x1C1C3F0", Offset = "0x1C1B1F0", VA = "0x181C1C3F0")]
|
||||
private bool HasAssociatedText()
|
||||
{
|
||||
bool flag = this.associatedText.CanWrite;
|
||||
byte[] array = this.initialAssociatedText;
|
||||
if (array == 0)
|
||||
{
|
||||
flag = flag + array != null;
|
||||
return flag > false;
|
||||
}
|
||||
int length = array.Length;
|
||||
flag = (flag ? 1 : 0) + length != 0;
|
||||
return flag > false;
|
||||
}
|
||||
|
||||
// Token: 0x04007254 RID: 29268
|
||||
[Token(Token = "0x4007254")]
|
||||
private static readonly int BlockSize;
|
||||
|
||||
// Token: 0x04007255 RID: 29269
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007255")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x04007256 RID: 29270
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007256")]
|
||||
private readonly byte[] macBlock;
|
||||
|
||||
// Token: 0x04007257 RID: 29271
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007257")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x04007258 RID: 29272
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007258")]
|
||||
private byte[] nonce;
|
||||
|
||||
// Token: 0x04007259 RID: 29273
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007259")]
|
||||
private byte[] initialAssociatedText;
|
||||
|
||||
// Token: 0x0400725A RID: 29274
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400725A")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x0400725B RID: 29275
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400725B")]
|
||||
private ICipherParameters keyParam;
|
||||
|
||||
// Token: 0x0400725C RID: 29276
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400725C")]
|
||||
private readonly MemoryStream associatedText;
|
||||
|
||||
// Token: 0x0400725D RID: 29277
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400725D")]
|
||||
private readonly MemoryStream data;
|
||||
}
|
||||
}
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C34 RID: 7220
|
||||
[Token(Token = "0x2001C34")]
|
||||
public class CfbBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B43B RID: 46139 RVA: 0x00273AB0 File Offset: 0x00271CB0
|
||||
[Token(Token = "0x600B43B")]
|
||||
[Address(RVA = "0x1C1E280", Offset = "0x1C1D080", VA = "0x181C1E280")]
|
||||
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: 0x0600B43C RID: 46140 RVA: 0x00273B04 File Offset: 0x00271D04
|
||||
[Token(Token = "0x600B43C")]
|
||||
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B43D RID: 46141 RVA: 0x00273B18 File Offset: 0x00271D18
|
||||
[Token(Token = "0x600B43D")]
|
||||
[Address(RVA = "0x1C1E020", Offset = "0x1C1CE20", VA = "0x181C1E020", 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: 0x17001C78 RID: 7288
|
||||
// (get) Token: 0x0600B43E RID: 46142 RVA: 0x00273BC8 File Offset: 0x00271DC8
|
||||
[Token(Token = "0x17001C78")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B43E")]
|
||||
[Address(RVA = "0x1C1E360", Offset = "0x1C1D160", VA = "0x181C1E360", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001C79 RID: 7289
|
||||
// (get) Token: 0x0600B43F RID: 46143 RVA: 0x00273BEC File Offset: 0x00271DEC
|
||||
[Token(Token = "0x17001C79")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B43F")]
|
||||
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B440 RID: 46144 RVA: 0x00273BFC File Offset: 0x00271DFC
|
||||
[Token(Token = "0x600B440")]
|
||||
[Address(RVA = "0x42EED0", Offset = "0x42DCD0", VA = "0x18042EED0", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B441 RID: 46145 RVA: 0x00273C10 File Offset: 0x00271E10
|
||||
[Token(Token = "0x600B441")]
|
||||
[Address(RVA = "0x1C1E1E0", Offset = "0x1C1CFE0", VA = "0x181C1E1E0", 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: 0x0600B442 RID: 46146 RVA: 0x00273C2C File Offset: 0x00271E2C
|
||||
[Token(Token = "0x600B442")]
|
||||
[Address(RVA = "0x1C1DE00", Offset = "0x1C1CC00", VA = "0x181C1DE00")]
|
||||
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: 0x0600B443 RID: 46147 RVA: 0x00273CC4 File Offset: 0x00271EC4
|
||||
[Token(Token = "0x600B443")]
|
||||
[Address(RVA = "0x1C1DBF0", Offset = "0x1C1C9F0", VA = "0x181C1DBF0")]
|
||||
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: 0x0600B444 RID: 46148 RVA: 0x00273D70 File Offset: 0x00271F70
|
||||
[Token(Token = "0x600B444")]
|
||||
[Address(RVA = "0x1C1E210", Offset = "0x1C1D010", VA = "0x181C1E210", 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: 0x0400725E RID: 29278
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400725E")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x0400725F RID: 29279
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400725F")]
|
||||
private byte[] cfbV;
|
||||
|
||||
// Token: 0x04007260 RID: 29280
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007260")]
|
||||
private byte[] cfbOutV;
|
||||
|
||||
// Token: 0x04007261 RID: 29281
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007261")]
|
||||
private bool encrypting;
|
||||
|
||||
// Token: 0x04007262 RID: 29282
|
||||
[FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x4007262")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x04007263 RID: 29283
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007263")]
|
||||
private readonly IBlockCipher cipher;
|
||||
}
|
||||
}
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C35 RID: 7221
|
||||
[Token(Token = "0x2001C35")]
|
||||
public class CtsBlockCipher : BufferedBlockCipher
|
||||
{
|
||||
// Token: 0x0600B445 RID: 46149 RVA: 0x00273DB0 File Offset: 0x00271FB0
|
||||
[Token(Token = "0x600B445")]
|
||||
[Address(RVA = "0x1C1F7C0", Offset = "0x1C1E5C0", VA = "0x181C1F7C0")]
|
||||
public CtsBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B445)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CtsBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_3B:
|
||||
stloc:ArgumentException(var_3_45, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CtsBlockCipher can only accept ECB, or CBC ciphers")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B446 RID: 46150 RVA: 0x00273E04 File Offset: 0x00272004
|
||||
[Token(Token = "0x600B446")]
|
||||
[Address(RVA = "0x1810360", Offset = "0x180F160", VA = "0x181810360", Slot = "26")]
|
||||
public override int GetUpdateOutputSize(int length)
|
||||
{
|
||||
byte[] buf = this.buf;
|
||||
int num = this.bufOff;
|
||||
int length2 = buf.Length;
|
||||
num += length;
|
||||
if (length != 0)
|
||||
{
|
||||
return num - length;
|
||||
}
|
||||
return num - length2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B447 RID: 46151 RVA: 0x00273E40 File Offset: 0x00272040
|
||||
[Token(Token = "0x600B447")]
|
||||
[Address(RVA = "0x1B33830", Offset = "0x1B32630", VA = "0x181B33830", Slot = "25")]
|
||||
public override int GetOutputSize(int length)
|
||||
{
|
||||
int bufOff = this.bufOff;
|
||||
return bufOff + length;
|
||||
}
|
||||
|
||||
// Token: 0x0600B448 RID: 46152 RVA: 0x00273E5C File Offset: 0x0027205C
|
||||
[Token(Token = "0x600B448")]
|
||||
[Address(RVA = "0x1C1F3D0", Offset = "0x1C1E1D0", VA = "0x181C1F3D0", Slot = "28")]
|
||||
public override int ProcessByte(byte input, byte[] output, int outOff)
|
||||
{
|
||||
byte[] buf = this.buf;
|
||||
int num = 0;
|
||||
int bufOff = this.bufOff;
|
||||
if (bufOff == buf.Length)
|
||||
{
|
||||
IBlockCipher cipher = this.cipher;
|
||||
byte[] buf2 = this.buf;
|
||||
int num2 = 0;
|
||||
int num3 = this.blockSize;
|
||||
Array.Copy(buf2, num3, buf2, num2, num3);
|
||||
}
|
||||
int num4 = bufOff + 1;
|
||||
this.bufOff = num4;
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B449 RID: 46153 RVA: 0x00273EC4 File Offset: 0x002720C4
|
||||
[Token(Token = "0x600B449")]
|
||||
[Address(RVA = "0x1C1F4D0", Offset = "0x1C1E2D0", VA = "0x181C1F4D0", Slot = "32")]
|
||||
public override int ProcessBytes(byte[] input, int inOff, int length, byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B449)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CtsBlockCipher::ProcessBytes(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_8C:
|
||||
stloc:uint8[](var_15_95, ldfld:uint8[](BufferedBlockCipher::buf, ldloc:CtsBlockCipher[exp:BufferedBlockCipher](this)))
|
||||
call:void(Array::Copy, ldloc:uint8[][exp:Array](input), ldloc:int32(inOff), ldloc:uint8[][exp:Array](var_15_95), ldloc:int32(var_13), ldloc:int32(length))
|
||||
stloc:ArgumentException(var_16_AD, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Can't have a negative input outLength!")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B44A RID: 46154 RVA: 0x00273F80 File Offset: 0x00272180
|
||||
[Token(Token = "0x600B44A")]
|
||||
[Address(RVA = "0x1C1EF40", Offset = "0x1C1DD40", VA = "0x181C1EF40", Slot = "36")]
|
||||
public override int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
num += outOff;
|
||||
IBlockCipher cipher = this.cipher;
|
||||
int bufOff = this.bufOff;
|
||||
byte[] array = new byte[0];
|
||||
byte[] array2 = new byte[0];
|
||||
IBlockCipher cipher2 = this.cipher;
|
||||
if (cipher2 == 0 || cipher2 != 0)
|
||||
{
|
||||
byte[] buf = this.buf;
|
||||
byte[] buf2 = this.buf;
|
||||
IBlockCipher cipher3 = this.cipher;
|
||||
IBlockCipher cipher4 = this.cipher;
|
||||
int num2 = this.bufOff;
|
||||
byte[] buf3 = this.buf;
|
||||
if (num2 != buf3.Length)
|
||||
{
|
||||
num2++;
|
||||
num2++;
|
||||
byte[] buf4 = this.buf;
|
||||
}
|
||||
byte[] buf5 = this.buf;
|
||||
num2 += buf5;
|
||||
num2++;
|
||||
IBlockCipher cipher5 = this.cipher;
|
||||
if (cipher5 == 0 || cipher5 != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int num3;
|
||||
return num3;
|
||||
}
|
||||
|
||||
// Token: 0x04007264 RID: 29284
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007264")]
|
||||
private readonly int blockSize;
|
||||
}
|
||||
}
|
||||
+476
@@ -0,0 +1,476 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C36 RID: 7222
|
||||
[Token(Token = "0x2001C36")]
|
||||
public class EaxBlockCipher : IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x0600B44B RID: 46155 RVA: 0x00274054 File Offset: 0x00272254
|
||||
[Token(Token = "0x600B44B")]
|
||||
[Address(RVA = "0x1C21F40", Offset = "0x1C20D40", VA = "0x181C21F40")]
|
||||
public EaxBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
int num = this.blockSize;
|
||||
CMac cmac;
|
||||
this.mac = cmac;
|
||||
byte[] array = new byte[num];
|
||||
IMac mac = this.mac;
|
||||
this.macBlock = array;
|
||||
byte[] array2 = new byte[array];
|
||||
IMac mac2 = this.mac;
|
||||
this.associatedTextMac = array2;
|
||||
byte[] array3 = new byte[array2];
|
||||
this.nonceMac = array3;
|
||||
SicBlockCipher sicBlockCipher = new SicBlockCipher(cipher);
|
||||
this.cipher = sicBlockCipher;
|
||||
}
|
||||
|
||||
// Token: 0x17001C7A RID: 7290
|
||||
// (get) Token: 0x0600B44C RID: 46156 RVA: 0x002740CC File Offset: 0x002722CC
|
||||
[Token(Token = "0x17001C7A")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B44C")]
|
||||
[Address(RVA = "0x1C220A0", Offset = "0x1C20EA0", VA = "0x181C220A0", Slot = "17")]
|
||||
get
|
||||
{
|
||||
this.cipher.Reset();
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B44D RID: 46157 RVA: 0x002740EC File Offset: 0x002722EC
|
||||
[Token(Token = "0x600B44D")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "18")]
|
||||
public virtual IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B44D)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::GetUnderlyingCipher()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:SicBlockCipher(var_0_06, ldfld:SicBlockCipher(EaxBlockCipher::cipher, ldloc:EaxBlockCipher(this)))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B44E RID: 46158 RVA: 0x00274100 File Offset: 0x00272300
|
||||
[Token(Token = "0x600B44E")]
|
||||
[Address(RVA = "0x5F5DE0", Offset = "0x5F4BE0", VA = "0x1805F5DE0", Slot = "19")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
string algorithmName = ((IBlockCipher)this.cipher).AlgorithmName;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B44F RID: 46159 RVA: 0x00274120 File Offset: 0x00272320
|
||||
[Token(Token = "0x600B44F")]
|
||||
[Address(RVA = "0x1C21570", Offset = "0x1C20370", VA = "0x181C21570", Slot = "20")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B44F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_E3:
|
||||
stloc:ArgumentException(var_22_ED, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("invalid parameters passed to EAX")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B450 RID: 46160 RVA: 0x0027421C File Offset: 0x0027241C
|
||||
[Token(Token = "0x600B450")]
|
||||
[Address(RVA = "0x1C214A0", Offset = "0x1C202A0", VA = "0x181C214A0")]
|
||||
private void InitCipher()
|
||||
{
|
||||
if (!this.cipherInitialized)
|
||||
{
|
||||
IMac mac = this.mac;
|
||||
this.cipherInitialized = true;
|
||||
byte[] array = new byte[this.blockSize];
|
||||
int num = this.blockSize;
|
||||
IMac mac2 = this.mac;
|
||||
int num2 = this.blockSize;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B451 RID: 46161 RVA: 0x0027426C File Offset: 0x0027246C
|
||||
[Token(Token = "0x600B451")]
|
||||
[Address(RVA = "0x1C20F90", Offset = "0x1C1FD90", VA = "0x181C20F90")]
|
||||
private void CalculateMac()
|
||||
{
|
||||
byte[] array = new byte[this.blockSize];
|
||||
IMac mac = this.mac;
|
||||
int num = 0;
|
||||
byte[] array2 = this.macBlock;
|
||||
if (num < array2.Length)
|
||||
{
|
||||
byte[] array3 = this.nonceMac;
|
||||
byte[] array4 = this.associatedTextMac;
|
||||
num++;
|
||||
byte[] array5 = this.macBlock;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B452 RID: 46162 RVA: 0x002742C0 File Offset: 0x002724C0
|
||||
[Token(Token = "0x600B452")]
|
||||
[Address(RVA = "0x1C21D50", Offset = "0x1C20B50", VA = "0x181C21D50", Slot = "21")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
this.Reset(true);
|
||||
}
|
||||
|
||||
// Token: 0x0600B453 RID: 46163 RVA: 0x002742D4 File Offset: 0x002724D4
|
||||
[Token(Token = "0x600B453")]
|
||||
[Address(RVA = "0x1C21D60", Offset = "0x1C20B60", VA = "0x181C21D60")]
|
||||
private void Reset(bool clearMac)
|
||||
{
|
||||
SicBlockCipher sicBlockCipher = this.cipher;
|
||||
IMac mac = this.mac;
|
||||
byte[] array = this.bufBlock;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
if (clearMac)
|
||||
{
|
||||
byte[] array2 = this.macBlock;
|
||||
int length2 = array2.Length;
|
||||
int num2 = 0;
|
||||
Array.Clear(array2, num2, length2);
|
||||
}
|
||||
byte[] array3 = new byte[this.blockSize];
|
||||
int num3 = this.blockSize;
|
||||
IMac mac2 = this.mac;
|
||||
int num4 = this.blockSize;
|
||||
byte[] array4 = this.initialAssociatedText;
|
||||
this.cipherInitialized = false;
|
||||
if (array4 != 0)
|
||||
{
|
||||
this.ProcessAadByte(array4);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B454 RID: 46164 RVA: 0x00274380 File Offset: 0x00272580
|
||||
[Token(Token = "0x600B454")]
|
||||
[Address(RVA = "0x1C21910", Offset = "0x1C20710", VA = "0x181C21910", Slot = "22")]
|
||||
public virtual void ProcessAadByte(byte input)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B454)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::ProcessAadByte(System.Byte)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_10:
|
||||
stloc:InvalidOperationException(var_1_1A, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("AAD data cannot be added after encryption/decryption processing has begun.")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B455 RID: 46165 RVA: 0x002743A8 File Offset: 0x002725A8
|
||||
[Token(Token = "0x600B455")]
|
||||
[Address(RVA = "0x1C219A0", Offset = "0x1C207A0", VA = "0x181C219A0", Slot = "23")]
|
||||
public virtual void ProcessAadBytes(byte[] inBytes, int inOff, int len)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B455)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::ProcessAadBytes(System.Byte[],System.Int32,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_11:
|
||||
stloc:InvalidOperationException(var_1_1B, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("AAD data cannot be added after encryption/decryption processing has begun.")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B456 RID: 46166 RVA: 0x002743D0 File Offset: 0x002725D0
|
||||
[Token(Token = "0x600B456")]
|
||||
[Address(RVA = "0x1C21A60", Offset = "0x1C20860", VA = "0x181C21A60", Slot = "24")]
|
||||
public virtual int ProcessByte(byte input, byte[] outBytes, int outOff)
|
||||
{
|
||||
this.InitCipher();
|
||||
return this.Process(input, outBytes, outOff);
|
||||
}
|
||||
|
||||
// Token: 0x0600B457 RID: 46167 RVA: 0x002743EC File Offset: 0x002725EC
|
||||
[Token(Token = "0x600B457")]
|
||||
[Address(RVA = "0x1C21AC0", Offset = "0x1C208C0", VA = "0x181C21AC0", Slot = "25")]
|
||||
public virtual int ProcessBytes(byte[] inBytes, int inOff, int len, byte[] outBytes, int outOff)
|
||||
{
|
||||
this.InitCipher();
|
||||
int num = 0;
|
||||
if (len != 0)
|
||||
{
|
||||
int num2;
|
||||
num += num2;
|
||||
num2 = inOff;
|
||||
num2 -= inOff;
|
||||
while (num2 != len)
|
||||
{
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B458 RID: 46168 RVA: 0x0027441C File Offset: 0x0027261C
|
||||
[Token(Token = "0x600B458")]
|
||||
[Address(RVA = "0x1C210C0", Offset = "0x1C1FEC0", VA = "0x181C210C0", Slot = "26")]
|
||||
public virtual int DoFinal(byte[] outBytes, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B458)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_148:
|
||||
stloc:InvalidCipherTextException(var_22_152, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in EAX failed")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B459 RID: 46169 RVA: 0x0027457C File Offset: 0x0027277C
|
||||
[Token(Token = "0x600B459")]
|
||||
[Address(RVA = "0x1C213D0", Offset = "0x1C201D0", VA = "0x181C213D0", Slot = "27")]
|
||||
public virtual byte[] GetMac()
|
||||
{
|
||||
byte[] array = new byte[this.macSize];
|
||||
int num = this.macSize;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(this.macBlock, num3, array, num2, num);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B45A RID: 46170 RVA: 0x002745B4 File Offset: 0x002727B4
|
||||
[Token(Token = "0x600B45A")]
|
||||
[Address(RVA = "0x1C21470", Offset = "0x1C20270", VA = "0x181C21470", Slot = "28")]
|
||||
public virtual int GetUpdateOutputSize(int len)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
num += len;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
int num2 = this.macSize;
|
||||
num -= num2;
|
||||
}
|
||||
return num - len;
|
||||
}
|
||||
|
||||
// Token: 0x0600B45B RID: 46171 RVA: 0x002745E8 File Offset: 0x002727E8
|
||||
[Token(Token = "0x600B45B")]
|
||||
[Address(RVA = "0x1C21440", Offset = "0x1C20240", VA = "0x181C21440", Slot = "29")]
|
||||
public virtual int GetOutputSize(int len)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
int num2 = this.macSize;
|
||||
num += len;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
return num2 + num;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return num - num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B45C RID: 46172 RVA: 0x00274624 File Offset: 0x00272824
|
||||
[Token(Token = "0x600B45C")]
|
||||
[Address(RVA = "0x1C21B80", Offset = "0x1C20980", VA = "0x181C21B80")]
|
||||
private int Process(byte b, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
byte[] array = this.bufBlock;
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
int length = this.bufBlock.Length;
|
||||
if (this.bufOff != length)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int num3 = 0;
|
||||
int num4 = this.blockSize;
|
||||
Check.OutputLength(outBytes, outOff, num4, "Output buffer is too short");
|
||||
if ((this.forEncryption ? 1 : 0) == num3)
|
||||
{
|
||||
IMac mac = this.mac;
|
||||
int num5 = this.blockSize;
|
||||
int num6 = this.cipher.GetBlockSize();
|
||||
}
|
||||
int num7 = this.cipher.GetBlockSize();
|
||||
IMac mac2 = this.mac;
|
||||
int num8 = this.blockSize;
|
||||
this.bufOff = num3;
|
||||
if ((this.forEncryption ? 1 : 0) == num3)
|
||||
{
|
||||
byte[] array2 = this.bufBlock;
|
||||
int num9 = 0;
|
||||
int num10 = this.macSize;
|
||||
int num11 = this.blockSize;
|
||||
Array.Copy(array2, num11, array2, num9, num10);
|
||||
int num12 = this.macSize;
|
||||
this.bufOff = num12;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B45D RID: 46173 RVA: 0x00274718 File Offset: 0x00272918
|
||||
[Token(Token = "0x600B45D")]
|
||||
[Address(RVA = "0x1C21EB0", Offset = "0x1C20CB0", VA = "0x181C21EB0")]
|
||||
private bool VerifyMac(byte[] mac, int off)
|
||||
{
|
||||
int num = this.macSize;
|
||||
int num2 = 0;
|
||||
if (num > 0)
|
||||
{
|
||||
byte[] array = this.macBlock;
|
||||
num2++;
|
||||
}
|
||||
return num2 == 0;
|
||||
}
|
||||
|
||||
// Token: 0x04007265 RID: 29285
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007265")]
|
||||
private SicBlockCipher cipher;
|
||||
|
||||
// Token: 0x04007266 RID: 29286
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007266")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x04007267 RID: 29287
|
||||
[FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x4007267")]
|
||||
private int blockSize;
|
||||
|
||||
// Token: 0x04007268 RID: 29288
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007268")]
|
||||
private IMac mac;
|
||||
|
||||
// Token: 0x04007269 RID: 29289
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007269")]
|
||||
private byte[] nonceMac;
|
||||
|
||||
// Token: 0x0400726A RID: 29290
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400726A")]
|
||||
private byte[] associatedTextMac;
|
||||
|
||||
// Token: 0x0400726B RID: 29291
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400726B")]
|
||||
private byte[] macBlock;
|
||||
|
||||
// Token: 0x0400726C RID: 29292
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400726C")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x0400726D RID: 29293
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400726D")]
|
||||
private byte[] bufBlock;
|
||||
|
||||
// Token: 0x0400726E RID: 29294
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400726E")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x0400726F RID: 29295
|
||||
[FieldOffset(Offset = "0x54")]
|
||||
[Token(Token = "0x400726F")]
|
||||
private bool cipherInitialized;
|
||||
|
||||
// Token: 0x04007270 RID: 29296
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4007270")]
|
||||
private byte[] initialAssociatedText;
|
||||
|
||||
// Token: 0x02001C37 RID: 7223
|
||||
[Token(Token = "0x2001C37")]
|
||||
private enum Tag : byte
|
||||
{
|
||||
// Token: 0x04007272 RID: 29298
|
||||
[Token(Token = "0x4007272")]
|
||||
N,
|
||||
// Token: 0x04007273 RID: 29299
|
||||
[Token(Token = "0x4007273")]
|
||||
H,
|
||||
// Token: 0x04007274 RID: 29300
|
||||
[Token(Token = "0x4007274")]
|
||||
C
|
||||
}
|
||||
}
|
||||
}
|
||||
+249
@@ -0,0 +1,249 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C39 RID: 7225
|
||||
[Token(Token = "0x2001C39")]
|
||||
public class GOfbBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B477 RID: 46199 RVA: 0x0027557C File Offset: 0x0027377C
|
||||
[Token(Token = "0x600B477")]
|
||||
[Address(RVA = "0x1C22AC0", Offset = "0x1C218C0", VA = "0x181C22AC0")]
|
||||
public GOfbBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[0];
|
||||
this.IV = array;
|
||||
byte[] array2 = new byte[array];
|
||||
this.ofbV = array2;
|
||||
byte[] array3 = new byte[array2];
|
||||
this.ofbOutV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B478 RID: 46200 RVA: 0x002755D8 File Offset: 0x002737D8
|
||||
[Token(Token = "0x600B478")]
|
||||
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B479 RID: 46201 RVA: 0x002755EC File Offset: 0x002737EC
|
||||
[Token(Token = "0x600B479")]
|
||||
[Address(RVA = "0x1C22550", Offset = "0x1C21350", VA = "0x181C22550", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
do
|
||||
{
|
||||
int num = 0;
|
||||
this.firstStep = true;
|
||||
this.N3 = num;
|
||||
if (parameters == 0 || parameters == 0)
|
||||
{
|
||||
goto IL_4D;
|
||||
}
|
||||
}
|
||||
while (parameters == 0);
|
||||
byte[] iv = this.IV;
|
||||
byte[] array;
|
||||
int length = array.Length;
|
||||
int length2 = iv.Length;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(array, num2, iv, num3, length2);
|
||||
IL_4D:
|
||||
byte[] iv2 = this.IV;
|
||||
int length3 = iv2.Length;
|
||||
int num4 = 0;
|
||||
byte[] array2 = this.ofbV;
|
||||
int num5 = 0;
|
||||
Array.Copy(iv2, num5, array2, num4, length3);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
if (parameters != 0)
|
||||
{
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001C7C RID: 7292
|
||||
// (get) Token: 0x0600B47A RID: 46202 RVA: 0x00275690 File Offset: 0x00273890
|
||||
[Token(Token = "0x17001C7C")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B47A")]
|
||||
[Address(RVA = "0x1C22CA0", Offset = "0x1C21AA0", VA = "0x181C22CA0", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/GCTR";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001C7D RID: 7293
|
||||
// (get) Token: 0x0600B47B RID: 46203 RVA: 0x002756B8 File Offset: 0x002738B8
|
||||
[Token(Token = "0x17001C7D")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B47B")]
|
||||
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B47C RID: 46204 RVA: 0x002756C8 File Offset: 0x002738C8
|
||||
[Token(Token = "0x600B47C")]
|
||||
[Address(RVA = "0x42EE50", Offset = "0x42DC50", VA = "0x18042EE50", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B47D RID: 46205 RVA: 0x002756DC File Offset: 0x002738DC
|
||||
[Token(Token = "0x600B47D")]
|
||||
[Address(RVA = "0x1C22780", Offset = "0x1C21580", VA = "0x181C22780", Slot = "8")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
int num = 0;
|
||||
if ((this.firstStep ? 1 : 0) != num)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.firstStep = num != 0;
|
||||
byte[] array = this.ofbOutV;
|
||||
byte[] array2 = this.ofbOutV;
|
||||
int num2 = 0;
|
||||
int num3 = this.bytesToint(array2, num2);
|
||||
byte[] array3 = this.ofbOutV;
|
||||
this.N3 = num3;
|
||||
int num4 = this.bytesToint(array3, 4);
|
||||
this.N4 = num4;
|
||||
}
|
||||
int num5 = this.N3;
|
||||
num5 += 16843009;
|
||||
int num6 = this.N4;
|
||||
this.N3 = num5;
|
||||
if (num6 < 16843012 && num6 > 0)
|
||||
{
|
||||
num6++;
|
||||
this.N4 = num6;
|
||||
}
|
||||
byte[] array4 = this.ofbV;
|
||||
int num7 = 0;
|
||||
this.intTobytes(num5, array4, num7);
|
||||
byte[] array5 = this.ofbV;
|
||||
int n = this.N4;
|
||||
uint num8;
|
||||
this.intTobytes(n, array5, (int)num8);
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array6 = this.ofbOutV;
|
||||
int num9;
|
||||
if (this.blockSize > 0)
|
||||
{
|
||||
byte[] array7 = this.ofbOutV;
|
||||
num9 = this.blockSize;
|
||||
}
|
||||
byte[] array8 = this.ofbV;
|
||||
int num10 = array8.Length;
|
||||
int num11 = 0;
|
||||
num10 -= num9;
|
||||
Array.Copy(array8, num9, array8, num11, num10);
|
||||
byte[] array9 = this.ofbV;
|
||||
int num12 = this.blockSize;
|
||||
int num13 = 0;
|
||||
int num14 = array9.Length;
|
||||
byte[] array10 = this.ofbOutV;
|
||||
num14 -= num12;
|
||||
Array.Copy(array10, num13, array9, num14, num12);
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B47E RID: 46206 RVA: 0x0027584C File Offset: 0x00273A4C
|
||||
[Token(Token = "0x600B47E")]
|
||||
[Address(RVA = "0x1C22A50", Offset = "0x1C21850", VA = "0x181C22A50", 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: 0x0600B47F RID: 46207 RVA: 0x0027588C File Offset: 0x00273A8C
|
||||
[Token(Token = "0x600B47F")]
|
||||
[Address(RVA = "0x1C22BE0", Offset = "0x1C219E0", VA = "0x181C22BE0")]
|
||||
private int bytesToint(byte[] inBytes, int inOff)
|
||||
{
|
||||
int length = inBytes.Length;
|
||||
int num = inOff + 1;
|
||||
byte b;
|
||||
byte b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
byte b3;
|
||||
b += b3;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B480 RID: 46208 RVA: 0x002758B8 File Offset: 0x00273AB8
|
||||
[Token(Token = "0x600B480")]
|
||||
[Address(RVA = "0x1C22D00", Offset = "0x1C21B00", VA = "0x181C22D00")]
|
||||
private void intTobytes(int num, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num2 = outOff + 1;
|
||||
}
|
||||
|
||||
// Token: 0x0400728F RID: 29327
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400728F")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x04007290 RID: 29328
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007290")]
|
||||
private byte[] ofbV;
|
||||
|
||||
// Token: 0x04007291 RID: 29329
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007291")]
|
||||
private byte[] ofbOutV;
|
||||
|
||||
// Token: 0x04007292 RID: 29330
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007292")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x04007293 RID: 29331
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007293")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x04007294 RID: 29332
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007294")]
|
||||
private bool firstStep = true;
|
||||
|
||||
// Token: 0x04007295 RID: 29333
|
||||
[FieldOffset(Offset = "0x3C")]
|
||||
[Token(Token = "0x4007295")]
|
||||
private int N3;
|
||||
|
||||
// Token: 0x04007296 RID: 29334
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007296")]
|
||||
private int N4;
|
||||
|
||||
// Token: 0x04007297 RID: 29335
|
||||
[Token(Token = "0x4007297")]
|
||||
private const int C1 = 16843012;
|
||||
|
||||
// Token: 0x04007298 RID: 29336
|
||||
[Token(Token = "0x4007298")]
|
||||
private const int C2 = 16843009;
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001C41 RID: 7233
|
||||
[Token(Token = "0x2001C41")]
|
||||
public class BasicGcmExponentiator : IGcmExponentiator
|
||||
{
|
||||
// Token: 0x0600B4E7 RID: 46311 RVA: 0x00277A78 File Offset: 0x00275C78
|
||||
[Token(Token = "0x600B4E7")]
|
||||
[Address(RVA = "0x1C19D30", Offset = "0x1C18B30", VA = "0x181C19D30", Slot = "4")]
|
||||
public void Init(byte[] x)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(x, num, array);
|
||||
this.x = array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4E8 RID: 46312 RVA: 0x00277AA0 File Offset: 0x00275CA0
|
||||
[Token(Token = "0x600B4E8")]
|
||||
[Address(RVA = "0x1C19B90", Offset = "0x1C18990", VA = "0x181C19B90", Slot = "5")]
|
||||
public void ExponentiateX(long pow, byte[] output)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
array[0] = (uint)((ulong)2147483648L);
|
||||
uint[] array2 = Arrays.Clone(this.x);
|
||||
GcmUtilities.Multiply(array, array2);
|
||||
GcmUtilities.Multiply(array2, array2);
|
||||
int num = 0;
|
||||
Pack.UInt32_To_BE(array, output, num);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4E9 RID: 46313 RVA: 0x00277AF0 File Offset: 0x00275CF0
|
||||
[Token(Token = "0x600B4E9")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public BasicGcmExponentiator()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x040072DA RID: 29402
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072DA")]
|
||||
private uint[] x;
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001C42 RID: 7234
|
||||
[Token(Token = "0x2001C42")]
|
||||
public class BasicGcmMultiplier : IGcmMultiplier
|
||||
{
|
||||
// Token: 0x0600B4EA RID: 46314 RVA: 0x00277B04 File Offset: 0x00275D04
|
||||
[Token(Token = "0x600B4EA")]
|
||||
[Address(RVA = "0x1C19DE0", Offset = "0x1C18BE0", VA = "0x181C19DE0", Slot = "4")]
|
||||
public void Init(byte[] H)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(H, num, array);
|
||||
this.H = array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4EB RID: 46315 RVA: 0x00277B2C File Offset: 0x00275D2C
|
||||
[Token(Token = "0x600B4EB")]
|
||||
[Address(RVA = "0x1C19E90", Offset = "0x1C18C90", VA = "0x181C19E90", Slot = "5")]
|
||||
public void MultiplyH(byte[] x)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(x, num, array);
|
||||
uint[] h = this.H;
|
||||
GcmUtilities.Multiply(array, h);
|
||||
int num2 = 0;
|
||||
Pack.UInt32_To_BE(array, x, num2);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4EC RID: 46316 RVA: 0x00277B64 File Offset: 0x00275D64
|
||||
[Token(Token = "0x600B4EC")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public BasicGcmMultiplier()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x040072DB RID: 29403
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072DB")]
|
||||
private uint[] H;
|
||||
}
|
||||
}
|
||||
+441
@@ -0,0 +1,441 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001C43 RID: 7235
|
||||
[Token(Token = "0x2001C43")]
|
||||
internal abstract class GcmUtilities
|
||||
{
|
||||
// Token: 0x0600B4ED RID: 46317 RVA: 0x00277B78 File Offset: 0x00275D78
|
||||
[Token(Token = "0x600B4ED")]
|
||||
[Address(RVA = "0x1C250F0", Offset = "0x1C23EF0", VA = "0x181C250F0")]
|
||||
private static uint[] GenerateLookup()
|
||||
{
|
||||
uint[] array = new uint[256];
|
||||
int num = 0;
|
||||
num++;
|
||||
array[0] = (uint)256;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4EE RID: 46318 RVA: 0x00277BAC File Offset: 0x00275DAC
|
||||
[Token(Token = "0x600B4EE")]
|
||||
[Address(RVA = "0x1C25B00", Offset = "0x1C24900", VA = "0x181C25B00")]
|
||||
internal static byte[] OneAsBytes()
|
||||
{
|
||||
byte[] array = new byte[16];
|
||||
array[0] = (byte)((ulong)128L);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4EF RID: 46319 RVA: 0x00277BD8 File Offset: 0x00275DD8
|
||||
[Token(Token = "0x600B4EF")]
|
||||
[Address(RVA = "0x1C25B60", Offset = "0x1C24960", VA = "0x181C25B60")]
|
||||
internal static uint[] OneAsUints()
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
array[0] = (uint)((ulong)2147483648L);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4F0 RID: 46320 RVA: 0x00277C04 File Offset: 0x00275E04
|
||||
[Token(Token = "0x600B4F0")]
|
||||
[Address(RVA = "0x1C25BC0", Offset = "0x1C249C0", VA = "0x181C25BC0")]
|
||||
internal static ulong[] OneAsUlongs()
|
||||
{
|
||||
ulong[] array = new ulong[2];
|
||||
array[0] = (ulong)long.MinValue;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4F1 RID: 46321 RVA: 0x00277C30 File Offset: 0x00275E30
|
||||
[Token(Token = "0x600B4F1")]
|
||||
[Address(RVA = "0x1C24FF0", Offset = "0x1C23DF0", VA = "0x181C24FF0")]
|
||||
internal static byte[] AsBytes(uint[] x)
|
||||
{
|
||||
return Pack.UInt32_To_BE(x);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4F2 RID: 46322 RVA: 0x00277C44 File Offset: 0x00275E44
|
||||
[Token(Token = "0x600B4F2")]
|
||||
[Address(RVA = "0x1C25000", Offset = "0x1C23E00", VA = "0x181C25000")]
|
||||
internal static void AsBytes(uint[] x, byte[] z)
|
||||
{
|
||||
int num = 0;
|
||||
Pack.UInt32_To_BE(x, z, num);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4F3 RID: 46323 RVA: 0x00277C5C File Offset: 0x00275E5C
|
||||
[Token(Token = "0x600B4F3")]
|
||||
[Address(RVA = "0x1C24F80", Offset = "0x1C23D80", VA = "0x181C24F80")]
|
||||
internal static byte[] AsBytes(ulong[] x)
|
||||
{
|
||||
byte[] array = new byte[16];
|
||||
int num = 0;
|
||||
Pack.UInt64_To_BE(x, array, num);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4F4 RID: 46324 RVA: 0x00277C7C File Offset: 0x00275E7C
|
||||
[Token(Token = "0x600B4F4")]
|
||||
[Address(RVA = "0x1C24FE0", Offset = "0x1C23DE0", VA = "0x181C24FE0")]
|
||||
internal static void AsBytes(ulong[] x, byte[] z)
|
||||
{
|
||||
int num = 0;
|
||||
Pack.UInt64_To_BE(x, z, num);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4F5 RID: 46325 RVA: 0x00277C94 File Offset: 0x00275E94
|
||||
[Token(Token = "0x600B4F5")]
|
||||
[Address(RVA = "0x1C25020", Offset = "0x1C23E20", VA = "0x181C25020")]
|
||||
internal static uint[] AsUints(byte[] bs)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(bs, num, array);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4F6 RID: 46326 RVA: 0x00277CB4 File Offset: 0x00275EB4
|
||||
[Token(Token = "0x600B4F6")]
|
||||
[Address(RVA = "0x1C25010", Offset = "0x1C23E10", VA = "0x181C25010")]
|
||||
internal static void AsUints(byte[] bs, uint[] output)
|
||||
{
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(bs, num, output);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4F7 RID: 46327 RVA: 0x00277CCC File Offset: 0x00275ECC
|
||||
[Token(Token = "0x600B4F7")]
|
||||
[Address(RVA = "0x1C25080", Offset = "0x1C23E80", VA = "0x181C25080")]
|
||||
internal static ulong[] AsUlongs(byte[] x)
|
||||
{
|
||||
ulong[] array = new ulong[2];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt64(x, num, array);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4F8 RID: 46328 RVA: 0x00277CEC File Offset: 0x00275EEC
|
||||
[Token(Token = "0x600B4F8")]
|
||||
[Address(RVA = "0x1C250E0", Offset = "0x1C23EE0", VA = "0x181C250E0")]
|
||||
public static void AsUlongs(byte[] x, ulong[] z)
|
||||
{
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt64(x, num, z);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4F9 RID: 46329 RVA: 0x00277D04 File Offset: 0x00275F04
|
||||
[Token(Token = "0x600B4F9")]
|
||||
[Address(RVA = "0x1C258B0", Offset = "0x1C246B0", VA = "0x181C258B0")]
|
||||
internal static void Multiply(byte[] x, byte[] y)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(x, num, array);
|
||||
uint[] array2 = new uint[4];
|
||||
int num2 = 0;
|
||||
Pack.BE_To_UInt32(y, num2, array2);
|
||||
GcmUtilities.Multiply(array, array2);
|
||||
int num3 = 0;
|
||||
Pack.UInt32_To_BE(array, x, num3);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4FA RID: 46330 RVA: 0x00277D48 File Offset: 0x00275F48
|
||||
[Token(Token = "0x600B4FA")]
|
||||
[Address(RVA = "0x1C256D0", Offset = "0x1C244D0", VA = "0x181C256D0")]
|
||||
internal static void Multiply(uint[] x, uint[] y)
|
||||
{
|
||||
int length = x.Length;
|
||||
int num = 0;
|
||||
uint num2 = y[num];
|
||||
num2 += num2;
|
||||
while (num != y.Length)
|
||||
{
|
||||
}
|
||||
num++;
|
||||
x[0] = (uint)num;
|
||||
x[0] = (uint)num;
|
||||
x[1] = (uint)num;
|
||||
x[1] = (uint)num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4FB RID: 46331 RVA: 0x00277DA0 File Offset: 0x00275FA0
|
||||
[Token(Token = "0x600B4FB")]
|
||||
[Address(RVA = "0x1C259C0", Offset = "0x1C247C0", VA = "0x181C259C0")]
|
||||
internal static void Multiply(ulong[] x, ulong[] y)
|
||||
{
|
||||
int length = x.Length;
|
||||
ulong num = x[1];
|
||||
int num2 = 0;
|
||||
ulong num3 = y[num2];
|
||||
num3 += num3;
|
||||
while (num2 != y.Length)
|
||||
{
|
||||
}
|
||||
num2++;
|
||||
x[0] = (ulong)num2;
|
||||
x[1] = (ulong)num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4FC RID: 46332 RVA: 0x00277DF0 File Offset: 0x00275FF0
|
||||
[Token(Token = "0x600B4FC")]
|
||||
[Address(RVA = "0x1C25410", Offset = "0x1C24210", VA = "0x181C25410")]
|
||||
internal static void MultiplyP(uint[] x)
|
||||
{
|
||||
uint num = x[0];
|
||||
x[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
x[0] = num;
|
||||
uint num3 = x[1];
|
||||
x[1] = num2;
|
||||
x[1] = num3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4FD RID: 46333 RVA: 0x00277E40 File Offset: 0x00276040
|
||||
[Token(Token = "0x600B4FD")]
|
||||
[Address(RVA = "0x1C25520", Offset = "0x1C24320", VA = "0x181C25520")]
|
||||
internal static void MultiplyP(uint[] x, uint[] z)
|
||||
{
|
||||
uint num = x[0];
|
||||
z[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
z[0] = num;
|
||||
uint num3 = x[1];
|
||||
z[1] = num2;
|
||||
z[1] = num3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4FE RID: 46334 RVA: 0x00277E90 File Offset: 0x00276090
|
||||
[Token(Token = "0x600B4FE")]
|
||||
[Address(RVA = "0x1C252C0", Offset = "0x1C240C0", VA = "0x181C252C0")]
|
||||
internal static void MultiplyP8(uint[] x)
|
||||
{
|
||||
uint num = x[0];
|
||||
x[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
x[0] = num;
|
||||
uint num3 = x[1];
|
||||
x[1] = num2;
|
||||
num = x[1];
|
||||
x[1] = num3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4FF RID: 46335 RVA: 0x00277EE8 File Offset: 0x002760E8
|
||||
[Token(Token = "0x600B4FF")]
|
||||
[Address(RVA = "0x1C25200", Offset = "0x1C24000", VA = "0x181C25200")]
|
||||
internal static void MultiplyP8(uint[] x, uint[] y)
|
||||
{
|
||||
uint num = GcmUtilities.ShiftRightN(x, 8, y);
|
||||
}
|
||||
|
||||
// Token: 0x0600B500 RID: 46336 RVA: 0x00277F04 File Offset: 0x00276104
|
||||
[Token(Token = "0x600B500")]
|
||||
[Address(RVA = "0x1C25E90", Offset = "0x1C24C90", VA = "0x181C25E90")]
|
||||
internal static uint ShiftRight(uint[] x)
|
||||
{
|
||||
uint num = x[0];
|
||||
x[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
x[0] = num;
|
||||
uint num3 = x[1];
|
||||
x[1] = num2;
|
||||
uint num4 = x[1];
|
||||
x[1] = num3;
|
||||
return num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B501 RID: 46337 RVA: 0x00277F60 File Offset: 0x00276160
|
||||
[Token(Token = "0x600B501")]
|
||||
[Address(RVA = "0x1C25F50", Offset = "0x1C24D50", VA = "0x181C25F50")]
|
||||
internal static uint ShiftRight(uint[] x, uint[] z)
|
||||
{
|
||||
uint num = x[0];
|
||||
z[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
z[0] = num;
|
||||
uint num3 = x[1];
|
||||
z[1] = num2;
|
||||
uint num4 = x[1];
|
||||
z[1] = num3;
|
||||
return num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B502 RID: 46338 RVA: 0x00277FB8 File Offset: 0x002761B8
|
||||
[Token(Token = "0x600B502")]
|
||||
[Address(RVA = "0x1C25DA0", Offset = "0x1C24BA0", VA = "0x181C25DA0")]
|
||||
internal static uint ShiftRightN(uint[] x, int n)
|
||||
{
|
||||
uint num = x[0];
|
||||
x[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
x[0] = num;
|
||||
uint num3 = x[1];
|
||||
x[1] = num2;
|
||||
uint num4 = x[1];
|
||||
x[1] = num3;
|
||||
return num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B503 RID: 46339 RVA: 0x00278014 File Offset: 0x00276214
|
||||
[Token(Token = "0x600B503")]
|
||||
[Address(RVA = "0x1C25C30", Offset = "0x1C24A30", VA = "0x181C25C30")]
|
||||
internal static uint ShiftRightN(uint[] x, int n, uint[] z)
|
||||
{
|
||||
uint num = x[0];
|
||||
z[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
z[0] = num;
|
||||
uint num3 = x[1];
|
||||
z[1] = num2;
|
||||
uint num4 = x[1];
|
||||
z[1] = num3;
|
||||
return num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B504 RID: 46340 RVA: 0x00278070 File Offset: 0x00276270
|
||||
[Token(Token = "0x600B504")]
|
||||
[Address(RVA = "0x1C266E0", Offset = "0x1C254E0", VA = "0x181C266E0")]
|
||||
internal static void Xor(byte[] x, byte[] y)
|
||||
{
|
||||
int num = 0;
|
||||
num += 3;
|
||||
if (4UL < (ulong)16L)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B505 RID: 46341 RVA: 0x00278090 File Offset: 0x00276290
|
||||
[Token(Token = "0x600B505")]
|
||||
[Address(RVA = "0x1C26090", Offset = "0x1C24E90", VA = "0x181C26090")]
|
||||
internal static void Xor(byte[] x, byte[] y, int yOff)
|
||||
{
|
||||
int num = 0;
|
||||
num++;
|
||||
num++;
|
||||
num += 2;
|
||||
num++;
|
||||
num++;
|
||||
}
|
||||
|
||||
// Token: 0x0600B506 RID: 46342 RVA: 0x002780BC File Offset: 0x002762BC
|
||||
[Token(Token = "0x600B506")]
|
||||
[Address(RVA = "0x1C26830", Offset = "0x1C25630", VA = "0x181C26830")]
|
||||
internal static void Xor(byte[] x, int xOff, byte[] y, int yOff, byte[] z, int zOff)
|
||||
{
|
||||
int num = 0;
|
||||
num += 4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B507 RID: 46343 RVA: 0x002780D8 File Offset: 0x002762D8
|
||||
[Token(Token = "0x600B507")]
|
||||
[Address(RVA = "0x1C26670", Offset = "0x1C25470", VA = "0x181C26670")]
|
||||
internal static void Xor(byte[] x, byte[] y, int yOff, int yLen)
|
||||
{
|
||||
int num = yLen - 1;
|
||||
}
|
||||
|
||||
// Token: 0x0600B508 RID: 46344 RVA: 0x002780F0 File Offset: 0x002762F0
|
||||
[Token(Token = "0x600B508")]
|
||||
[Address(RVA = "0x1C26B90", Offset = "0x1C25990", VA = "0x181C26B90")]
|
||||
internal static void Xor(byte[] x, int xOff, byte[] y, int yOff, int len)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B509 RID: 46345 RVA: 0x00278104 File Offset: 0x00276304
|
||||
[Token(Token = "0x600B509")]
|
||||
[Address(RVA = "0x1C264A0", Offset = "0x1C252A0", VA = "0x181C264A0")]
|
||||
internal static void Xor(byte[] x, byte[] y, byte[] z)
|
||||
{
|
||||
int num = 0;
|
||||
byte b = x[num];
|
||||
z[0] = b;
|
||||
num += 3;
|
||||
if (4UL < (ulong)16L)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B50A RID: 46346 RVA: 0x00278134 File Offset: 0x00276334
|
||||
[Token(Token = "0x600B50A")]
|
||||
[Address(RVA = "0x1C263B0", Offset = "0x1C251B0", VA = "0x181C263B0")]
|
||||
internal static void Xor(uint[] x, uint[] y)
|
||||
{
|
||||
uint num = y[1];
|
||||
}
|
||||
|
||||
// Token: 0x0600B50B RID: 46347 RVA: 0x00278150 File Offset: 0x00276350
|
||||
[Token(Token = "0x600B50B")]
|
||||
[Address(RVA = "0x1C26210", Offset = "0x1C25010", VA = "0x181C26210")]
|
||||
internal static void Xor(uint[] x, uint[] y, uint[] z)
|
||||
{
|
||||
uint num = y[0];
|
||||
z[0] = num;
|
||||
uint num2 = y[0];
|
||||
z[0] = num2;
|
||||
uint num3 = y[1];
|
||||
z[1] = num3;
|
||||
uint num4 = y[1];
|
||||
z[1] = num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B50C RID: 46348 RVA: 0x002781A4 File Offset: 0x002763A4
|
||||
[Token(Token = "0x600B50C")]
|
||||
[Address(RVA = "0x1C26A40", Offset = "0x1C25840", VA = "0x181C26A40")]
|
||||
internal static void Xor(ulong[] x, ulong[] y)
|
||||
{
|
||||
ulong num = y[1];
|
||||
}
|
||||
|
||||
// Token: 0x0600B50D RID: 46349 RVA: 0x002781C0 File Offset: 0x002763C0
|
||||
[Token(Token = "0x600B50D")]
|
||||
[Address(RVA = "0x1C26AD0", Offset = "0x1C258D0", VA = "0x181C26AD0")]
|
||||
internal static void Xor(ulong[] x, ulong[] y, ulong[] z)
|
||||
{
|
||||
ulong num = y[0];
|
||||
z[0] = num;
|
||||
ulong num2 = y[1];
|
||||
z[1] = num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B50E RID: 46350 RVA: 0x002781F4 File Offset: 0x002763F4
|
||||
[Token(Token = "0x600B50E")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
protected GcmUtilities()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B50F RID: 46351 RVA: 0x00278208 File Offset: 0x00276408
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x600B50F")]
|
||||
[Address(RVA = "0x1C26C20", Offset = "0x1C25A20", VA = "0x181C26C20")]
|
||||
static GcmUtilities()
|
||||
{
|
||||
uint[] array = new uint[256];
|
||||
int num = 0;
|
||||
num++;
|
||||
array[0] = (uint)256;
|
||||
}
|
||||
|
||||
// Token: 0x040072DC RID: 29404
|
||||
[Token(Token = "0x40072DC")]
|
||||
private const uint E1 = 3774873600U;
|
||||
|
||||
// Token: 0x040072DD RID: 29405
|
||||
[Token(Token = "0x40072DD")]
|
||||
private const ulong E1L = 16212958658533785600UL;
|
||||
|
||||
// Token: 0x040072DE RID: 29406
|
||||
[Token(Token = "0x40072DE")]
|
||||
private static readonly uint[] LOOKUP;
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001C44 RID: 7236
|
||||
[Token(Token = "0x2001C44")]
|
||||
public interface IGcmExponentiator
|
||||
{
|
||||
// Token: 0x0600B510 RID: 46352
|
||||
[Token(Token = "0x600B510")]
|
||||
[Address(Slot = "0")]
|
||||
void Init(byte[] x);
|
||||
|
||||
// Token: 0x0600B511 RID: 46353
|
||||
[Token(Token = "0x600B511")]
|
||||
[Address(Slot = "1")]
|
||||
void ExponentiateX(long pow, byte[] output);
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001C45 RID: 7237
|
||||
[Token(Token = "0x2001C45")]
|
||||
public interface IGcmMultiplier
|
||||
{
|
||||
// Token: 0x0600B512 RID: 46354
|
||||
[Token(Token = "0x600B512")]
|
||||
[Address(Slot = "0")]
|
||||
void Init(byte[] H);
|
||||
|
||||
// Token: 0x0600B513 RID: 46355
|
||||
[Token(Token = "0x600B513")]
|
||||
[Address(Slot = "1")]
|
||||
void MultiplyH(byte[] x);
|
||||
}
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001C46 RID: 7238
|
||||
[Token(Token = "0x2001C46")]
|
||||
public class Tables1kGcmExponentiator : IGcmExponentiator
|
||||
{
|
||||
// Token: 0x0600B514 RID: 46356 RVA: 0x0027823C File Offset: 0x0027643C
|
||||
[Token(Token = "0x600B514")]
|
||||
[Address(RVA = "0x1C31160", Offset = "0x1C2FF60", VA = "0x181C31160", Slot = "4")]
|
||||
public void Init(byte[] x)
|
||||
{
|
||||
uint[] array;
|
||||
do
|
||||
{
|
||||
array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(x, num, array);
|
||||
if (this.lookupPowX2 == 0)
|
||||
{
|
||||
goto IL_2C;
|
||||
}
|
||||
if (array == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (array == 0);
|
||||
if (Arrays.AreEqual(array, array))
|
||||
{
|
||||
return;
|
||||
}
|
||||
IL_2C:
|
||||
IList list = Platform.CreateArrayList(8);
|
||||
this.lookupPowX2 = list;
|
||||
}
|
||||
|
||||
// Token: 0x0600B515 RID: 46357 RVA: 0x0027828C File Offset: 0x0027648C
|
||||
[Token(Token = "0x600B515")]
|
||||
[Address(RVA = "0x1C30FD0", Offset = "0x1C2FDD0", VA = "0x181C30FD0", Slot = "5")]
|
||||
public void ExponentiateX(long pow, byte[] output)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
array[0] = (uint)((ulong)2147483648L);
|
||||
this.EnsureAvailable(num);
|
||||
IList list = this.lookupPowX2;
|
||||
GcmUtilities.Multiply(array, array);
|
||||
num++;
|
||||
int num2 = 0;
|
||||
Pack.UInt32_To_BE(array, output, num2);
|
||||
}
|
||||
|
||||
// Token: 0x0600B516 RID: 46358 RVA: 0x002782DC File Offset: 0x002764DC
|
||||
[Token(Token = "0x600B516")]
|
||||
[Address(RVA = "0x1C30DF0", Offset = "0x1C2FBF0", VA = "0x181C30DF0")]
|
||||
private void EnsureAvailable(int bit)
|
||||
{
|
||||
IList list = this.lookupPowX2;
|
||||
IList list2 = this.lookupPowX2;
|
||||
int i = 0;
|
||||
int num = 0;
|
||||
uint[] array;
|
||||
GcmUtilities.Multiply(array, array);
|
||||
IList list3 = this.lookupPowX2;
|
||||
if (i < num)
|
||||
{
|
||||
i += i;
|
||||
i++;
|
||||
}
|
||||
while (i <= bit)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B517 RID: 46359 RVA: 0x00278338 File Offset: 0x00276538
|
||||
[Token(Token = "0x600B517")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public Tables1kGcmExponentiator()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x040072DF RID: 29407
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072DF")]
|
||||
private IList lookupPowX2;
|
||||
}
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001C47 RID: 7239
|
||||
[Token(Token = "0x2001C47")]
|
||||
public class Tables64kGcmMultiplier : IGcmMultiplier
|
||||
{
|
||||
// Token: 0x0600B518 RID: 46360 RVA: 0x0027834C File Offset: 0x0027654C
|
||||
[Token(Token = "0x600B518")]
|
||||
[Address(RVA = "0x1C312D0", Offset = "0x1C300D0", VA = "0x181C312D0", Slot = "4")]
|
||||
public void Init(byte[] H)
|
||||
{
|
||||
uint[][][] m2;
|
||||
for (;;)
|
||||
{
|
||||
if (this.M != (ulong)0L)
|
||||
{
|
||||
if (Arrays.AreEqual(this.H, H))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint[][][] array = new uint[16][][];
|
||||
this.M = array;
|
||||
}
|
||||
byte[] array2 = Arrays.Clone(H);
|
||||
uint[][][] m = this.M;
|
||||
this.H = array2;
|
||||
uint[][] array3 = new uint[256][];
|
||||
if (array3 != 0)
|
||||
{
|
||||
}
|
||||
m[0] = array3;
|
||||
uint[][] array4 = this.M[0];
|
||||
uint[] array5 = new uint[4];
|
||||
if (array5 != 0)
|
||||
{
|
||||
}
|
||||
array4[0] = array5;
|
||||
uint[][] array6 = this.M[0];
|
||||
uint[] array7 = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(H, num, array7);
|
||||
if (array7 != 0)
|
||||
{
|
||||
}
|
||||
array6[128] = array7;
|
||||
m2 = this.M;
|
||||
uint[] array8 = m2[0][m2];
|
||||
if (m2 == 0)
|
||||
{
|
||||
}
|
||||
if (m2 != 0)
|
||||
{
|
||||
goto Block_2;
|
||||
}
|
||||
}
|
||||
return;
|
||||
Block_2:
|
||||
GcmUtilities.MultiplyP(m2);
|
||||
uint[][] array9 = this.M[0];
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B519 RID: 46361 RVA: 0x00278528 File Offset: 0x00276728
|
||||
[Token(Token = "0x600B519")]
|
||||
[Address(RVA = "0x1C31AF0", Offset = "0x1C308F0", VA = "0x181C31AF0", Slot = "5")]
|
||||
public void MultiplyH(byte[] x)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
byte b;
|
||||
uint num2 = this.M[num][(int)b][1];
|
||||
num++;
|
||||
while (num != 16)
|
||||
{
|
||||
}
|
||||
int num3 = 0;
|
||||
Pack.UInt32_To_BE(array, x, num3);
|
||||
}
|
||||
|
||||
// Token: 0x0600B51A RID: 46362 RVA: 0x00278574 File Offset: 0x00276774
|
||||
[Token(Token = "0x600B51A")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public Tables64kGcmMultiplier()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x040072E0 RID: 29408
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072E0")]
|
||||
private byte[] H;
|
||||
|
||||
// Token: 0x040072E1 RID: 29409
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072E1")]
|
||||
private uint[][][] M;
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001C48 RID: 7240
|
||||
[Token(Token = "0x2001C48")]
|
||||
public sealed class Tables8kGcmMultiplier : IGcmMultiplier
|
||||
{
|
||||
// Token: 0x0600B51B RID: 46363 RVA: 0x00278588 File Offset: 0x00276788
|
||||
[Token(Token = "0x600B51B")]
|
||||
[Address(RVA = "0x1C31CD0", Offset = "0x1C30AD0", VA = "0x181C31CD0", Slot = "4")]
|
||||
public void Init(byte[] H)
|
||||
{
|
||||
uint[][][] m3;
|
||||
for (;;)
|
||||
{
|
||||
if (this.M != (ulong)0L)
|
||||
{
|
||||
if (Arrays.AreEqual(this.H, H))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint[][][] array = new uint[32][][];
|
||||
this.M = array;
|
||||
}
|
||||
byte[] array2 = Arrays.Clone(H);
|
||||
uint[][][] m = this.M;
|
||||
this.H = array2;
|
||||
uint[][] array3 = new uint[16][];
|
||||
if (array3 != 0)
|
||||
{
|
||||
}
|
||||
m[0] = array3;
|
||||
uint[][][] m2 = this.M;
|
||||
uint[][] array4 = new uint[16][];
|
||||
if (array4 != 0)
|
||||
{
|
||||
}
|
||||
m2[1] = array4;
|
||||
uint[][] array5 = this.M[0];
|
||||
uint[] array6 = new uint[4];
|
||||
if (array6 != 0)
|
||||
{
|
||||
}
|
||||
array5[0] = array6;
|
||||
uint[][] array7 = this.M[1];
|
||||
uint[] array8 = new uint[4];
|
||||
if (array8 != 0)
|
||||
{
|
||||
}
|
||||
array7[0] = array8;
|
||||
uint[][] array9 = this.M[1];
|
||||
uint[] array10 = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(H, num, array10);
|
||||
if (array10 != 0)
|
||||
{
|
||||
}
|
||||
array9[8] = array10;
|
||||
m3 = this.M;
|
||||
uint[] array11 = m3[1][m3];
|
||||
if (m3 == 0)
|
||||
{
|
||||
}
|
||||
if (m3 != 0)
|
||||
{
|
||||
goto Block_2;
|
||||
}
|
||||
}
|
||||
return;
|
||||
Block_2:
|
||||
GcmUtilities.MultiplyP(m3);
|
||||
uint[][] array12 = this.M[1];
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B51C RID: 46364 RVA: 0x00278864 File Offset: 0x00276A64
|
||||
[Token(Token = "0x600B51C")]
|
||||
[Address(RVA = "0x1C32860", Offset = "0x1C31660", VA = "0x181C32860", Slot = "5")]
|
||||
public void MultiplyH(byte[] x)
|
||||
{
|
||||
uint[] array = this.z;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
uint[][] array2 = this.M[length];
|
||||
uint[] array3 = this.z;
|
||||
byte b;
|
||||
uint[] array4 = array2[(int)b];
|
||||
uint[] array5 = this.z;
|
||||
uint[] array6 = this.z;
|
||||
uint[] array7 = this.z;
|
||||
uint[][][] m = this.M;
|
||||
int num2 = length + 1;
|
||||
uint[][] array8 = m[num2];
|
||||
uint[] array9 = this.z;
|
||||
byte b2;
|
||||
uint[] array10 = array8[(int)b2];
|
||||
uint[] array11 = this.z;
|
||||
uint[] array12 = this.z;
|
||||
uint[] array13 = this.z;
|
||||
uint num3 = array10[1];
|
||||
uint[] array14 = this.z;
|
||||
int num4 = 0;
|
||||
Pack.UInt32_To_BE(array14, x, num4);
|
||||
}
|
||||
|
||||
// Token: 0x0600B51D RID: 46365 RVA: 0x0027892C File Offset: 0x00276B2C
|
||||
[Token(Token = "0x600B51D")]
|
||||
[Address(RVA = "0x1C32C00", Offset = "0x1C31A00", VA = "0x181C32C00")]
|
||||
public Tables8kGcmMultiplier()
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
this.z = array;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x040072E2 RID: 29410
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072E2")]
|
||||
private byte[] H;
|
||||
|
||||
// Token: 0x040072E3 RID: 29411
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072E3")]
|
||||
private uint[][][] M;
|
||||
|
||||
// Token: 0x040072E4 RID: 29412
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072E4")]
|
||||
private uint[] z;
|
||||
}
|
||||
}
|
||||
+710
@@ -0,0 +1,710 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C38 RID: 7224
|
||||
[Token(Token = "0x2001C38")]
|
||||
public sealed class GcmBlockCipher : IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x0600B45E RID: 46174 RVA: 0x00274748 File Offset: 0x00272948
|
||||
[Token(Token = "0x600B45E")]
|
||||
[Address(RVA = "0x1C24990", Offset = "0x1C23790", VA = "0x181C24990")]
|
||||
public GcmBlockCipher(IBlockCipher c)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B45E)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_45:
|
||||
stloc:ArgumentException(var_5_5B, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("cipher required with a block size of "), ldloc:int32[exp:object](var_4), ldstr:string[exp:object]("."))))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B45F RID: 46175 RVA: 0x002747B4 File Offset: 0x002729B4
|
||||
[Token(Token = "0x600B45F")]
|
||||
[Address(RVA = "0x1C24AD0", Offset = "0x1C238D0", VA = "0x181C24AD0")]
|
||||
public GcmBlockCipher(IBlockCipher c, IGcmMultiplier m)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B45F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm.IGcmMultiplier)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_49:
|
||||
stloc:ArgumentException(var_5_5F, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("cipher required with a block size of "), ldloc:int32[exp:object](var_4), ldstr:string[exp:object]("."))))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x17001C7B RID: 7291
|
||||
// (get) Token: 0x0600B460 RID: 46176 RVA: 0x00274824 File Offset: 0x00272A24
|
||||
[Token(Token = "0x17001C7B")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B460")]
|
||||
[Address(RVA = "0x1C24F20", Offset = "0x1C23D20", VA = "0x181C24F20", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/GCM";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B461 RID: 46177 RVA: 0x0027484C File Offset: 0x00272A4C
|
||||
[Token(Token = "0x600B461")]
|
||||
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "5")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B462 RID: 46178 RVA: 0x00274860 File Offset: 0x00272A60
|
||||
[Token(Token = "0x600B462")]
|
||||
[Address(RVA = "0x4B6B10", Offset = "0x4B5910", VA = "0x1804B6B10", Slot = "7")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x0600B463 RID: 46179 RVA: 0x00274870 File Offset: 0x00272A70
|
||||
[Token(Token = "0x600B463")]
|
||||
[Address(RVA = "0x1C23810", Offset = "0x1C22610", VA = "0x181C23810", Slot = "6")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B463)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_291:
|
||||
stloc:ArgumentException(var_45_29B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Key must be specified in initial init")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B464 RID: 46180 RVA: 0x00274B1C File Offset: 0x00272D1C
|
||||
[Token(Token = "0x600B464")]
|
||||
[Address(RVA = "0x1C234C0", Offset = "0x1C222C0", VA = "0x181C234C0", Slot = "13")]
|
||||
public byte[] GetMac()
|
||||
{
|
||||
byte[] array = this.macBlock;
|
||||
if (array == 0)
|
||||
{
|
||||
}
|
||||
return Arrays.Clone(array);
|
||||
}
|
||||
|
||||
// Token: 0x0600B465 RID: 46181 RVA: 0x00274B3C File Offset: 0x00272D3C
|
||||
[Token(Token = "0x600B465")]
|
||||
[Address(RVA = "0x1C236F0", Offset = "0x1C224F0", VA = "0x181C236F0", Slot = "15")]
|
||||
public int GetOutputSize(int len)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
int num2 = this.macSize;
|
||||
num += len;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
return num2 + num;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return num - num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B466 RID: 46182 RVA: 0x00274B78 File Offset: 0x00272D78
|
||||
[Token(Token = "0x600B466")]
|
||||
[Address(RVA = "0x1C23720", Offset = "0x1C22520", VA = "0x181C23720", Slot = "14")]
|
||||
public int GetUpdateOutputSize(int len)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
num += len;
|
||||
int num2;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
num2 = this.macSize;
|
||||
num -= num2;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
return num - num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B467 RID: 46183 RVA: 0x00274BB4 File Offset: 0x00272DB4
|
||||
[Token(Token = "0x600B467")]
|
||||
[Address(RVA = "0x1C23F80", Offset = "0x1C22D80", VA = "0x181C23F80", Slot = "8")]
|
||||
public void ProcessAadByte(byte input)
|
||||
{
|
||||
this.CheckStatus();
|
||||
byte[] array = this.atBlock;
|
||||
int num = this.atBlockPos;
|
||||
int num2 = this.atBlockPos;
|
||||
num2++;
|
||||
this.atBlockPos = num2;
|
||||
if (num2 == 16)
|
||||
{
|
||||
byte[] array2 = this.atBlock;
|
||||
byte[] s_at = this.S_at;
|
||||
this.gHASHBlock(s_at, array2);
|
||||
this.atBlockPos = (int)((ulong)0L);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B468 RID: 46184 RVA: 0x00274C14 File Offset: 0x00272E14
|
||||
[Token(Token = "0x600B468")]
|
||||
[Address(RVA = "0x1C24010", Offset = "0x1C22E10", VA = "0x181C24010", Slot = "9")]
|
||||
public void ProcessAadBytes(byte[] inBytes, int inOff, int len)
|
||||
{
|
||||
this.CheckStatus();
|
||||
if (len > 0)
|
||||
{
|
||||
int num = 0;
|
||||
byte[] array = this.atBlock;
|
||||
int num2 = this.atBlockPos;
|
||||
int num3 = this.atBlockPos;
|
||||
num3++;
|
||||
this.atBlockPos = num3;
|
||||
if (num3 == 16)
|
||||
{
|
||||
byte[] array2 = this.atBlock;
|
||||
byte[] s_at = this.S_at;
|
||||
this.gHASHBlock(s_at, array2);
|
||||
this.atBlockPos = num;
|
||||
}
|
||||
num3 = inOff - inOff;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B469 RID: 46185 RVA: 0x00274C88 File Offset: 0x00272E88
|
||||
[Token(Token = "0x600B469")]
|
||||
[Address(RVA = "0x1C23750", Offset = "0x1C22550", VA = "0x181C23750")]
|
||||
private void InitCipher()
|
||||
{
|
||||
if (this.atLength > (ulong)0L)
|
||||
{
|
||||
byte[] s_atPre = this.S_atPre;
|
||||
int num = 0;
|
||||
byte[] s_at = this.S_at;
|
||||
int num2 = 0;
|
||||
ulong num3;
|
||||
Array.Copy(s_at, num2, s_atPre, num, (int)num3);
|
||||
ulong num4 = this.atLength;
|
||||
this.atLengthPre = num4;
|
||||
}
|
||||
int num5 = this.atBlockPos;
|
||||
if (num5 > 0)
|
||||
{
|
||||
byte[] array = this.atBlock;
|
||||
int num6 = 0;
|
||||
byte[] s_atPre2 = this.S_atPre;
|
||||
this.gHASHPartial(s_atPre2, array, num6, num5);
|
||||
}
|
||||
if (this.atLengthPre != (ulong)0L)
|
||||
{
|
||||
byte[] s = this.S;
|
||||
int num7 = 0;
|
||||
byte[] s_atPre3 = this.S_atPre;
|
||||
int num8 = 0;
|
||||
ulong num9;
|
||||
Array.Copy(s_atPre3, num8, s, num7, (int)num9);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B46A RID: 46186 RVA: 0x00274D2C File Offset: 0x00272F2C
|
||||
[Token(Token = "0x600B46A")]
|
||||
[Address(RVA = "0x1C242F0", Offset = "0x1C230F0", VA = "0x181C242F0", Slot = "10")]
|
||||
public int ProcessByte(byte input, byte[] output, int outOff)
|
||||
{
|
||||
this.CheckStatus();
|
||||
byte[] array = this.bufBlock;
|
||||
int num = this.bufOff;
|
||||
int num2 = this.bufOff;
|
||||
byte[] array2 = this.bufBlock;
|
||||
num2++;
|
||||
this.bufOff = num2;
|
||||
if (num2 != array2.Length)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
this.ProcessBlock(array2, num4, output, outOff);
|
||||
int num7;
|
||||
if ((this.forEncryption ? 1 : 0) == num3)
|
||||
{
|
||||
byte[] array3 = this.bufBlock;
|
||||
int num5 = this.macSize;
|
||||
int num6 = 0;
|
||||
Array.Copy(array3, 16, array3, num6, num5);
|
||||
num7 = this.macSize;
|
||||
}
|
||||
this.bufOff = num7;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B46B RID: 46187 RVA: 0x00274DC4 File Offset: 0x00272FC4
|
||||
[Token(Token = "0x600B46B")]
|
||||
[Address(RVA = "0x1C243D0", Offset = "0x1C231D0", VA = "0x181C243D0", Slot = "11")]
|
||||
public int ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
this.CheckStatus();
|
||||
Check.DataLength(input, inOff, inOff, "input buffer too short");
|
||||
int num = 0;
|
||||
if ((this.forEncryption ? 1 : 0) == num)
|
||||
{
|
||||
if (len <= 0)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
byte[] array = this.bufBlock;
|
||||
int num2 = this.bufOff;
|
||||
int num3 = this.bufOff;
|
||||
byte[] array2 = this.bufBlock;
|
||||
num3++;
|
||||
this.bufOff = num3;
|
||||
if (num3 == array2.Length)
|
||||
{
|
||||
byte[] array3 = this.bufBlock;
|
||||
int num4 = 0;
|
||||
int num5 = this.macSize;
|
||||
Array.Copy(array3, 16, array3, num4, num5);
|
||||
int num6 = this.macSize;
|
||||
num += 16;
|
||||
this.bufOff = num6;
|
||||
}
|
||||
num3 = inOff - inOff;
|
||||
}
|
||||
if (this.bufOff != 0 && len > 0)
|
||||
{
|
||||
byte[] array4 = this.bufBlock;
|
||||
int num7 = this.bufOff;
|
||||
num7++;
|
||||
this.bufOff = num7;
|
||||
if (num7 == 16)
|
||||
{
|
||||
this.bufOff = num;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
num += 16;
|
||||
while (len != 16)
|
||||
{
|
||||
}
|
||||
if (len > 0)
|
||||
{
|
||||
byte[] array5 = this.bufBlock;
|
||||
int num8 = 0;
|
||||
Array.Copy(input, inOff, array5, num8, len);
|
||||
this.bufOff = len;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B46C RID: 46188 RVA: 0x00274EDC File Offset: 0x002730DC
|
||||
[Token(Token = "0x600B46C")]
|
||||
[Address(RVA = "0x1C22E40", Offset = "0x1C21C40", VA = "0x181C22E40", Slot = "12")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B46C)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_2FB:
|
||||
stloc:InvalidCipherTextException(var_58_305, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in GCM failed")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B46D RID: 46189 RVA: 0x002751F0 File Offset: 0x002733F0
|
||||
[Token(Token = "0x600B46D")]
|
||||
[Address(RVA = "0x1C247E0", Offset = "0x1C235E0", VA = "0x181C247E0", Slot = "16")]
|
||||
public void Reset()
|
||||
{
|
||||
this.Reset(true);
|
||||
}
|
||||
|
||||
// Token: 0x0600B46E RID: 46190 RVA: 0x00275204 File Offset: 0x00273404
|
||||
[Token(Token = "0x600B46E")]
|
||||
[Address(RVA = "0x1C247F0", Offset = "0x1C235F0", VA = "0x181C247F0")]
|
||||
private void Reset(bool clearMac)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array = new byte[16];
|
||||
this.S = array;
|
||||
byte[] array2 = new byte[16];
|
||||
this.S_at = array2;
|
||||
byte[] array3 = new byte[16];
|
||||
this.S_atPre = array3;
|
||||
byte[] array4 = new byte[16];
|
||||
byte[] j = this.J0;
|
||||
int num = 0;
|
||||
this.atBlockPos = num;
|
||||
this.atLength = (ulong)num;
|
||||
this.atLengthPre = (ulong)num;
|
||||
this.atBlock = array4;
|
||||
byte[] array5 = Arrays.Clone(j);
|
||||
byte[] array6 = this.bufBlock;
|
||||
this.counter = array5;
|
||||
this.blocksRemaining = (uint)((ulong)4294967294L);
|
||||
this.bufOff = num;
|
||||
this.totalLength = (ulong)num;
|
||||
if (array6 != 0)
|
||||
{
|
||||
int num2 = 0;
|
||||
Arrays.Fill(array6, (byte)num2);
|
||||
}
|
||||
if (clearMac)
|
||||
{
|
||||
this.macBlock = num;
|
||||
}
|
||||
if ((this.forEncryption ? 1 : 0) == num)
|
||||
{
|
||||
byte[] array7 = this.initialAssociatedText;
|
||||
if (array7 != 0)
|
||||
{
|
||||
int length = array7.Length;
|
||||
int num3 = 0;
|
||||
this.ProcessAadBytes(array7, num3, length);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B46F RID: 46191 RVA: 0x00275308 File Offset: 0x00273508
|
||||
[Token(Token = "0x600B46F")]
|
||||
[Address(RVA = "0x1C24110", Offset = "0x1C22F10", VA = "0x181C24110")]
|
||||
private void ProcessBlock(byte[] buf, int bufOff, byte[] output, int outOff)
|
||||
{
|
||||
if (this.totalLength == (ulong)0L)
|
||||
{
|
||||
this.InitCipher();
|
||||
}
|
||||
byte[] array = this.ctrBlock;
|
||||
this.GetNextCtrBlock(array);
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
GcmUtilities.Xor(this.S, buf, bufOff);
|
||||
IGcmMultiplier gcmMultiplier = this.multiplier;
|
||||
byte[] array2 = this.ctrBlock;
|
||||
}
|
||||
GcmUtilities.Xor(this.ctrBlock, buf, bufOff);
|
||||
byte[] array3 = this.ctrBlock;
|
||||
byte[] s = this.S;
|
||||
this.gHASHBlock(s, array3);
|
||||
byte[] array4 = this.ctrBlock;
|
||||
}
|
||||
|
||||
// Token: 0x0600B470 RID: 46192 RVA: 0x00275390 File Offset: 0x00273590
|
||||
[Token(Token = "0x600B470")]
|
||||
[Address(RVA = "0x1C246A0", Offset = "0x1C234A0", VA = "0x181C246A0")]
|
||||
private void ProcessPartial(byte[] buf, int off, int len, byte[] output, int outOff)
|
||||
{
|
||||
byte[] array = this.ctrBlock;
|
||||
this.GetNextCtrBlock(array);
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
byte[] s = this.S;
|
||||
this.gHASHPartial(s, buf, len, len);
|
||||
byte[] array2 = this.ctrBlock;
|
||||
int num = 0;
|
||||
GcmUtilities.Xor(buf, off, array2, num, len);
|
||||
}
|
||||
byte[] array3 = this.ctrBlock;
|
||||
int num2 = 0;
|
||||
GcmUtilities.Xor(buf, off, array3, num2, len);
|
||||
byte[] s2 = this.S;
|
||||
this.gHASHPartial(s2, buf, off, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B471 RID: 46193 RVA: 0x0027540C File Offset: 0x0027360C
|
||||
[Token(Token = "0x600B471")]
|
||||
[Address(RVA = "0x1C24E50", Offset = "0x1C23C50", VA = "0x181C24E50")]
|
||||
private void gHASH(byte[] Y, byte[] b, int len)
|
||||
{
|
||||
int num = 0;
|
||||
if (len > 0)
|
||||
{
|
||||
int num2 = Math.Min(len, 16);
|
||||
this.gHASHPartial(Y, b, num, num2);
|
||||
num += 16;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B472 RID: 46194 RVA: 0x00275438 File Offset: 0x00273638
|
||||
[Token(Token = "0x600B472")]
|
||||
[Address(RVA = "0x1C24CC0", Offset = "0x1C23AC0", VA = "0x181C24CC0")]
|
||||
private void gHASHBlock(byte[] Y, byte[] b)
|
||||
{
|
||||
GcmUtilities.Xor(Y, b);
|
||||
IGcmMultiplier gcmMultiplier = this.multiplier;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B473 RID: 46195 RVA: 0x00275458 File Offset: 0x00273658
|
||||
[Token(Token = "0x600B473")]
|
||||
[Address(RVA = "0x1C24C10", Offset = "0x1C23A10", VA = "0x181C24C10")]
|
||||
private void gHASHBlock(byte[] Y, byte[] b, int off)
|
||||
{
|
||||
GcmUtilities.Xor(Y, b, off);
|
||||
IGcmMultiplier gcmMultiplier = this.multiplier;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B474 RID: 46196 RVA: 0x0027547C File Offset: 0x0027367C
|
||||
[Token(Token = "0x600B474")]
|
||||
[Address(RVA = "0x1C24D60", Offset = "0x1C23B60", VA = "0x181C24D60")]
|
||||
private void gHASHPartial(byte[] Y, byte[] b, int off, int len)
|
||||
{
|
||||
IGcmMultiplier gcmMultiplier = this.multiplier;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B475 RID: 46197 RVA: 0x00275498 File Offset: 0x00273698
|
||||
[Token(Token = "0x600B475")]
|
||||
[Address(RVA = "0x1C23540", Offset = "0x1C22340", VA = "0x181C23540")]
|
||||
private void GetNextCtrBlock(byte[] block)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B475)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::GetNextCtrBlock(System.Byte[])
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_9E:
|
||||
stloc:InvalidOperationException(var_11_A8, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Attempt to process too many blocks")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B476 RID: 46198 RVA: 0x00275550 File Offset: 0x00273750
|
||||
[Token(Token = "0x600B476")]
|
||||
[Address(RVA = "0x1C22DA0", Offset = "0x1C21BA0", VA = "0x181C22DA0")]
|
||||
private void CheckStatus()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B476)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::CheckStatus()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_13:
|
||||
stloc:InvalidOperationException(var_0_1D, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("GCM cipher cannot be reused for encryption")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x04007275 RID: 29301
|
||||
[Token(Token = "0x4007275")]
|
||||
private const int BlockSize = 16;
|
||||
|
||||
// Token: 0x04007276 RID: 29302
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007276")]
|
||||
private byte[] ctrBlock;
|
||||
|
||||
// Token: 0x04007277 RID: 29303
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007277")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x04007278 RID: 29304
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007278")]
|
||||
private readonly IGcmMultiplier multiplier;
|
||||
|
||||
// Token: 0x04007279 RID: 29305
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007279")]
|
||||
private IGcmExponentiator exp;
|
||||
|
||||
// Token: 0x0400727A RID: 29306
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400727A")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x0400727B RID: 29307
|
||||
[FieldOffset(Offset = "0x31")]
|
||||
[Token(Token = "0x400727B")]
|
||||
private bool initialised;
|
||||
|
||||
// Token: 0x0400727C RID: 29308
|
||||
[FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x400727C")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x0400727D RID: 29309
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400727D")]
|
||||
private byte[] lastKey;
|
||||
|
||||
// Token: 0x0400727E RID: 29310
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400727E")]
|
||||
private byte[] nonce;
|
||||
|
||||
// Token: 0x0400727F RID: 29311
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400727F")]
|
||||
private byte[] initialAssociatedText;
|
||||
|
||||
// Token: 0x04007280 RID: 29312
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4007280")]
|
||||
private byte[] H;
|
||||
|
||||
// Token: 0x04007281 RID: 29313
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4007281")]
|
||||
private byte[] J0;
|
||||
|
||||
// Token: 0x04007282 RID: 29314
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4007282")]
|
||||
private byte[] bufBlock;
|
||||
|
||||
// Token: 0x04007283 RID: 29315
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x4007283")]
|
||||
private byte[] macBlock;
|
||||
|
||||
// Token: 0x04007284 RID: 29316
|
||||
[FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x4007284")]
|
||||
private byte[] S;
|
||||
|
||||
// Token: 0x04007285 RID: 29317
|
||||
[FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x4007285")]
|
||||
private byte[] S_at;
|
||||
|
||||
// Token: 0x04007286 RID: 29318
|
||||
[FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x4007286")]
|
||||
private byte[] S_atPre;
|
||||
|
||||
// Token: 0x04007287 RID: 29319
|
||||
[FieldOffset(Offset = "0x88")]
|
||||
[Token(Token = "0x4007287")]
|
||||
private byte[] counter;
|
||||
|
||||
// Token: 0x04007288 RID: 29320
|
||||
[FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x4007288")]
|
||||
private uint blocksRemaining;
|
||||
|
||||
// Token: 0x04007289 RID: 29321
|
||||
[FieldOffset(Offset = "0x94")]
|
||||
[Token(Token = "0x4007289")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x0400728A RID: 29322
|
||||
[FieldOffset(Offset = "0x98")]
|
||||
[Token(Token = "0x400728A")]
|
||||
private ulong totalLength;
|
||||
|
||||
// Token: 0x0400728B RID: 29323
|
||||
[FieldOffset(Offset = "0xA0")]
|
||||
[Token(Token = "0x400728B")]
|
||||
private byte[] atBlock;
|
||||
|
||||
// Token: 0x0400728C RID: 29324
|
||||
[FieldOffset(Offset = "0xA8")]
|
||||
[Token(Token = "0x400728C")]
|
||||
private int atBlockPos;
|
||||
|
||||
// Token: 0x0400728D RID: 29325
|
||||
[FieldOffset(Offset = "0xB0")]
|
||||
[Token(Token = "0x400728D")]
|
||||
private ulong atLength;
|
||||
|
||||
// Token: 0x0400728E RID: 29326
|
||||
[FieldOffset(Offset = "0xB8")]
|
||||
[Token(Token = "0x400728E")]
|
||||
private ulong atLengthPre;
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C3A RID: 7226
|
||||
[Token(Token = "0x2001C3A")]
|
||||
public interface IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x17001C7E RID: 7294
|
||||
// (get) Token: 0x0600B481 RID: 46209
|
||||
[Token(Token = "0x17001C7E")]
|
||||
string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B481")]
|
||||
[Address(Slot = "0")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x0600B482 RID: 46210
|
||||
[Token(Token = "0x600B482")]
|
||||
[Address(Slot = "1")]
|
||||
IBlockCipher GetUnderlyingCipher();
|
||||
|
||||
// Token: 0x0600B483 RID: 46211
|
||||
[Token(Token = "0x600B483")]
|
||||
[Address(Slot = "2")]
|
||||
void Init(bool forEncryption, ICipherParameters parameters);
|
||||
|
||||
// Token: 0x0600B484 RID: 46212
|
||||
[Token(Token = "0x600B484")]
|
||||
[Address(Slot = "3")]
|
||||
int GetBlockSize();
|
||||
|
||||
// Token: 0x0600B485 RID: 46213
|
||||
[Token(Token = "0x600B485")]
|
||||
[Address(Slot = "4")]
|
||||
void ProcessAadByte(byte input);
|
||||
|
||||
// Token: 0x0600B486 RID: 46214
|
||||
[Token(Token = "0x600B486")]
|
||||
[Address(Slot = "5")]
|
||||
void ProcessAadBytes(byte[] inBytes, int inOff, int len);
|
||||
|
||||
// Token: 0x0600B487 RID: 46215
|
||||
[Token(Token = "0x600B487")]
|
||||
[Address(Slot = "6")]
|
||||
int ProcessByte(byte input, byte[] outBytes, int outOff);
|
||||
|
||||
// Token: 0x0600B488 RID: 46216
|
||||
[Token(Token = "0x600B488")]
|
||||
[Address(Slot = "7")]
|
||||
int ProcessBytes(byte[] inBytes, int inOff, int len, byte[] outBytes, int outOff);
|
||||
|
||||
// Token: 0x0600B489 RID: 46217
|
||||
[Token(Token = "0x600B489")]
|
||||
[Address(Slot = "8")]
|
||||
int DoFinal(byte[] outBytes, int outOff);
|
||||
|
||||
// Token: 0x0600B48A RID: 46218
|
||||
[Token(Token = "0x600B48A")]
|
||||
[Address(Slot = "9")]
|
||||
byte[] GetMac();
|
||||
|
||||
// Token: 0x0600B48B RID: 46219
|
||||
[Token(Token = "0x600B48B")]
|
||||
[Address(Slot = "10")]
|
||||
int GetUpdateOutputSize(int len);
|
||||
|
||||
// Token: 0x0600B48C RID: 46220
|
||||
[Token(Token = "0x600B48C")]
|
||||
[Address(Slot = "11")]
|
||||
int GetOutputSize(int len);
|
||||
|
||||
// Token: 0x0600B48D RID: 46221
|
||||
[Token(Token = "0x600B48D")]
|
||||
[Address(Slot = "12")]
|
||||
void Reset();
|
||||
}
|
||||
}
|
||||
+602
@@ -0,0 +1,602 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C3B RID: 7227
|
||||
[Token(Token = "0x2001C3B")]
|
||||
public class KCcmBlockCipher : IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x0600B48E RID: 46222 RVA: 0x002758D0 File Offset: 0x00273AD0
|
||||
[Token(Token = "0x600B48E")]
|
||||
[Address(RVA = "0x1C2B850", Offset = "0x1C2A650", VA = "0x181C2B850")]
|
||||
private void setNb(int Nb)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B48E)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::setNb(System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_0C:
|
||||
stloc:ArgumentException(var_0_16, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Nb = 4 is recommended by DSTU7624 but can be changed to only 6 or 8 in this implementation")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B48F RID: 46223 RVA: 0x002758F4 File Offset: 0x00273AF4
|
||||
[Token(Token = "0x600B48F")]
|
||||
[Address(RVA = "0x1C2B3B0", Offset = "0x1C2A1B0", VA = "0x181C2B3B0")]
|
||||
public KCcmBlockCipher(IBlockCipher engine)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B490 RID: 46224 RVA: 0x00275904 File Offset: 0x00273B04
|
||||
[Token(Token = "0x600B490")]
|
||||
[Address(RVA = "0x1C2B3C0", Offset = "0x1C2A1C0", VA = "0x181C2B3C0")]
|
||||
public KCcmBlockCipher(IBlockCipher engine, int Nb)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B490)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_D8:
|
||||
stloc:ArgumentException(var_10_E2, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Nb = 4 is recommended by DSTU7624 but can be changed to only 6 or 8 in this implementation")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B491 RID: 46225 RVA: 0x002759F4 File Offset: 0x00273BF4
|
||||
[Token(Token = "0x600B491")]
|
||||
[Address(RVA = "0x1C29860", Offset = "0x1C28660", VA = "0x181C29860", Slot = "17")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B491)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_B9:
|
||||
stloc:ArgumentException(var_15_C3, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Invalid mac size specified")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x17001C7F RID: 7295
|
||||
// (get) Token: 0x0600B492 RID: 46226 RVA: 0x00275AC8 File Offset: 0x00273CC8
|
||||
[Token(Token = "0x17001C7F")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B492")]
|
||||
[Address(RVA = "0x1C2B7F0", Offset = "0x1C2A5F0", VA = "0x181C2B7F0", Slot = "18")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.engine;
|
||||
return 0 + "/KCCM";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B493 RID: 46227 RVA: 0x00275AF0 File Offset: 0x00273CF0
|
||||
[Token(Token = "0x600B493")]
|
||||
[Address(RVA = "0x1C297B0", Offset = "0x1C285B0", VA = "0x181C297B0", Slot = "19")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.engine;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B494 RID: 46228 RVA: 0x00275B0C File Offset: 0x00273D0C
|
||||
[Token(Token = "0x600B494")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "20")]
|
||||
public virtual IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.engine;
|
||||
}
|
||||
|
||||
// Token: 0x0600B495 RID: 46229 RVA: 0x00275B20 File Offset: 0x00273D20
|
||||
[Token(Token = "0x600B495")]
|
||||
[Address(RVA = "0x1C2A390", Offset = "0x1C29190", VA = "0x181C2A390", Slot = "21")]
|
||||
public virtual void ProcessAadByte(byte input)
|
||||
{
|
||||
((IDisposable)this.associatedText).Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x0600B496 RID: 46230 RVA: 0x00275B40 File Offset: 0x00273D40
|
||||
[Token(Token = "0x600B496")]
|
||||
[Address(RVA = "0x1C2A3C0", Offset = "0x1C291C0", VA = "0x181C2A3C0", Slot = "22")]
|
||||
public virtual void ProcessAadBytes(byte[] input, int inOff, int len)
|
||||
{
|
||||
int num = this.associatedText.Read(input, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B497 RID: 46231 RVA: 0x00275B64 File Offset: 0x00273D64
|
||||
[Token(Token = "0x600B497")]
|
||||
[Address(RVA = "0x1C29CF0", Offset = "0x1C28AF0", VA = "0x181C29CF0")]
|
||||
private void ProcessAAD(byte[] assocText, int assocOff, int assocLen, int dataLen)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B497)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::ProcessAAD(System.Byte[],System.Int32,System.Int32,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_1CD:
|
||||
stloc:IBlockCipher(var_40_1D3, ldfld:IBlockCipher(KCcmBlockCipher::engine, ldloc:KCcmBlockCipher(this)))
|
||||
stloc:uint8[](var_41_1DB, ldfld:uint8[](KCcmBlockCipher::macBlock, ldloc:KCcmBlockCipher(this)))
|
||||
stloc:ArgumentException(var_42_1E7, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("authText buffer too short")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B498 RID: 46232 RVA: 0x00275D5C File Offset: 0x00273F5C
|
||||
[Token(Token = "0x600B498")]
|
||||
[Address(RVA = "0x1C2A680", Offset = "0x1C29480", VA = "0x181C2A680", Slot = "23")]
|
||||
public virtual int ProcessByte(byte input, byte[] output, int outOff)
|
||||
{
|
||||
MemoryStream memoryStream = this.data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600B499 RID: 46233 RVA: 0x00275D78 File Offset: 0x00273F78
|
||||
[Token(Token = "0x600B499")]
|
||||
[Address(RVA = "0x1C2A6B0", Offset = "0x1C294B0", VA = "0x181C2A6B0", Slot = "24")]
|
||||
public virtual int ProcessBytes(byte[] input, int inOff, int inLen, byte[] output, int outOff)
|
||||
{
|
||||
Check.DataLength(input, inOff, inOff, "input buffer too short");
|
||||
int num = this.data.ReadByte();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600B49A RID: 46234 RVA: 0x00275DA8 File Offset: 0x00273FA8
|
||||
[Token(Token = "0x600B49A")]
|
||||
[Address(RVA = "0x1C2A750", Offset = "0x1C29550", VA = "0x181C2A750")]
|
||||
public int ProcessPacket(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
byte[] array11;
|
||||
byte[] array12;
|
||||
do
|
||||
{
|
||||
Check.DataLength(input, inOff, inOff, "input buffer too short");
|
||||
if (this.associatedText.CanWrite > false)
|
||||
{
|
||||
MemoryStream memoryStream = this.associatedText;
|
||||
bool canWrite = this.associatedText.CanWrite;
|
||||
MemoryStream memoryStream2 = this.data;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
bool canWrite2 = memoryStream2.CanWrite;
|
||||
}
|
||||
bool canWrite3 = memoryStream2.CanWrite;
|
||||
}
|
||||
IBlockCipher blockCipher = this.engine;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num = this.macSize;
|
||||
Check.DataLength(typeof(IBlockCipher).TypeHandle != 0, "partial blocks not supported");
|
||||
IBlockCipher blockCipher2 = this.engine;
|
||||
byte[] array = this.s;
|
||||
int num2 = 0;
|
||||
IBlockCipher blockCipher3 = this.engine;
|
||||
if (len > 0)
|
||||
{
|
||||
IBlockCipher blockCipher4 = this.engine;
|
||||
int num3 = 0;
|
||||
if (num3 < inOff)
|
||||
{
|
||||
num3 += num3;
|
||||
num3++;
|
||||
}
|
||||
IBlockCipher blockCipher5 = this.engine;
|
||||
int num4 = 0;
|
||||
uint num5;
|
||||
if (num4 < (int)num5)
|
||||
{
|
||||
num4 += num4;
|
||||
num4++;
|
||||
}
|
||||
num2++;
|
||||
}
|
||||
byte[] array2 = this.counter;
|
||||
uint num6;
|
||||
if (num6 < (uint)array2.Length)
|
||||
{
|
||||
byte[] array3 = this.s;
|
||||
num6 += (uint)1;
|
||||
byte[] array4 = this.counter;
|
||||
array4 += array4;
|
||||
array4 += array4;
|
||||
}
|
||||
IBlockCipher blockCipher6 = this.engine;
|
||||
byte[] array5 = this.buffer;
|
||||
if (this.macSize > 0)
|
||||
{
|
||||
byte[] array6 = this.buffer;
|
||||
int num7 = this.macSize;
|
||||
}
|
||||
byte[] array7 = this.counter;
|
||||
if (num6 < (uint)array7.Length)
|
||||
{
|
||||
byte[] array8 = this.s;
|
||||
num6 += (uint)1;
|
||||
if (this.counter != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
IBlockCipher blockCipher7 = this.engine;
|
||||
byte[] array9 = this.buffer;
|
||||
int num8 = this.macSize;
|
||||
int num9 = this.macSize;
|
||||
int num10 = 0;
|
||||
byte[] array10 = this.mac;
|
||||
int num11 = 0;
|
||||
Array.Copy(this.macBlock, num11, array10, num10, num9);
|
||||
array11 = new byte[this.macSize];
|
||||
int num12 = this.macSize;
|
||||
int num13 = 0;
|
||||
int num14 = 0;
|
||||
Array.Copy(this.buffer, num13, array11, num14, num12);
|
||||
array12 = this.mac;
|
||||
}
|
||||
while (!Arrays.ConstantTimeAreEqual(array12, array11));
|
||||
Check.DataLength(typeof(IBlockCipher).TypeHandle != 0, "partial blocks not supported");
|
||||
int num18;
|
||||
if (len > 0)
|
||||
{
|
||||
int num15 = 0;
|
||||
if (num15 < array12)
|
||||
{
|
||||
num15 += num15;
|
||||
num15++;
|
||||
}
|
||||
int num16 = 0;
|
||||
uint num17;
|
||||
if (num16 < (int)num17)
|
||||
{
|
||||
num16 += num16;
|
||||
num16++;
|
||||
}
|
||||
array12 += num16;
|
||||
num18 = 0;
|
||||
uint num19;
|
||||
if (num18 < (int)num19)
|
||||
{
|
||||
num18 += num18;
|
||||
num18++;
|
||||
}
|
||||
}
|
||||
uint num20;
|
||||
num20 += (uint)1;
|
||||
while (num18 != 0)
|
||||
{
|
||||
}
|
||||
num18 += num18;
|
||||
num18 += 2;
|
||||
num18 += 19;
|
||||
num18 += num18;
|
||||
num18 += 2;
|
||||
num18 += 19;
|
||||
num18 += num18;
|
||||
num18 += 2;
|
||||
num18 += 19;
|
||||
if (num18 > 0)
|
||||
{
|
||||
num20 += (uint)1;
|
||||
}
|
||||
num20 += (uint)len;
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B49B RID: 46235 RVA: 0x00276074 File Offset: 0x00274274
|
||||
[Token(Token = "0x600B49B")]
|
||||
[Address(RVA = "0x1C2A3F0", Offset = "0x1C291F0", VA = "0x181C2A3F0")]
|
||||
private void ProcessBlock(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
do
|
||||
{
|
||||
byte[] array = this.counter;
|
||||
int num = 0;
|
||||
if (num < array.Length)
|
||||
{
|
||||
byte[] array2 = this.s;
|
||||
num++;
|
||||
byte[] array3 = this.counter;
|
||||
}
|
||||
IBlockCipher blockCipher = this.engine;
|
||||
byte[] array4 = this.buffer;
|
||||
IBlockCipher blockCipher2 = this.engine;
|
||||
int num2 = 0;
|
||||
if (num2 < blockCipher)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
if (num2 >= num2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
byte[] array5 = this.buffer;
|
||||
}
|
||||
while (this.engine != 0);
|
||||
byte b;
|
||||
b += b;
|
||||
}
|
||||
|
||||
// Token: 0x0600B49C RID: 46236 RVA: 0x002760F8 File Offset: 0x002742F8
|
||||
[Token(Token = "0x600B49C")]
|
||||
[Address(RVA = "0x1C29590", Offset = "0x1C28390", VA = "0x181C29590")]
|
||||
private void CalculateMac(byte[] authText, int authOff, int len)
|
||||
{
|
||||
if (len > 0)
|
||||
{
|
||||
int num = 0;
|
||||
IBlockCipher blockCipher = this.engine;
|
||||
byte[] array = this.macBlock;
|
||||
num += array;
|
||||
num++;
|
||||
IBlockCipher blockCipher2 = this.engine;
|
||||
byte[] array2 = this.macBlock;
|
||||
IBlockCipher blockCipher3 = this.engine;
|
||||
IBlockCipher blockCipher4 = this.engine;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B49D RID: 46237 RVA: 0x00276148 File Offset: 0x00274348
|
||||
[Token(Token = "0x600B49D")]
|
||||
[Address(RVA = "0x1C29700", Offset = "0x1C28500", VA = "0x181C29700", Slot = "25")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
MemoryStream memoryStream = this.data;
|
||||
bool canWrite = this.data.CanWrite;
|
||||
return outOff;
|
||||
}
|
||||
|
||||
// Token: 0x0600B49E RID: 46238 RVA: 0x00276170 File Offset: 0x00274370
|
||||
[Token(Token = "0x600B49E")]
|
||||
[Address(RVA = "0x1C29800", Offset = "0x1C28600", VA = "0x181C29800", Slot = "26")]
|
||||
public virtual byte[] GetMac()
|
||||
{
|
||||
return Arrays.Clone(this.mac);
|
||||
}
|
||||
|
||||
// Token: 0x0600B49F RID: 46239 RVA: 0x00276188 File Offset: 0x00274388
|
||||
[Token(Token = "0x600B49F")]
|
||||
[Address(RVA = "0x7A2180", Offset = "0x7A0F80", VA = "0x1807A2180", Slot = "27")]
|
||||
public virtual int GetUpdateOutputSize(int len)
|
||||
{
|
||||
return len;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4A0 RID: 46240 RVA: 0x00276198 File Offset: 0x00274398
|
||||
[Token(Token = "0x600B4A0")]
|
||||
[Address(RVA = "0x1B33830", Offset = "0x1B32630", VA = "0x181B33830", Slot = "28")]
|
||||
public virtual int GetOutputSize(int len)
|
||||
{
|
||||
int num = this.macSize;
|
||||
return num + len;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4A1 RID: 46241 RVA: 0x002761B4 File Offset: 0x002743B4
|
||||
[Token(Token = "0x600B4A1")]
|
||||
[Address(RVA = "0x1C2B210", Offset = "0x1C2A010", VA = "0x181C2B210", Slot = "29")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
byte[] g = this.G1;
|
||||
int num = 0;
|
||||
Arrays.Fill(g, (byte)num);
|
||||
byte[] array = this.buffer;
|
||||
int num2 = 0;
|
||||
Arrays.Fill(array, (byte)num2);
|
||||
byte[] array2 = this.counter;
|
||||
int num3 = 0;
|
||||
Arrays.Fill(array2, (byte)num3);
|
||||
byte[] array3 = this.macBlock;
|
||||
int num4 = 0;
|
||||
Arrays.Fill(array3, (byte)num4);
|
||||
byte[] array4 = this.counter;
|
||||
MemoryStream memoryStream = this.data;
|
||||
MemoryStream memoryStream2 = this.associatedText;
|
||||
byte[] array5 = this.initialAssociatedText;
|
||||
if (array5 != 0)
|
||||
{
|
||||
this.ProcessAadByte(array5);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4A2 RID: 46242 RVA: 0x0027623C File Offset: 0x0027443C
|
||||
[Token(Token = "0x600B4A2")]
|
||||
[Address(RVA = "0x1C22D00", Offset = "0x1C21B00", VA = "0x181C22D00")]
|
||||
private void intToBytes(int num, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num2 = outOff + 1;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4A3 RID: 46243 RVA: 0x00276254 File Offset: 0x00274454
|
||||
[Token(Token = "0x600B4A3")]
|
||||
[Address(RVA = "0x1C2B610", Offset = "0x1C2A410", VA = "0x181C2B610")]
|
||||
private byte getFlag(bool authTextPresents, int macSize)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (authTextPresents)
|
||||
{
|
||||
}
|
||||
StringBuilder stringBuilder2 = stringBuilder.Append("0");
|
||||
if (macSize > 16)
|
||||
{
|
||||
if (macSize == 32)
|
||||
{
|
||||
}
|
||||
if (macSize == 48)
|
||||
{
|
||||
}
|
||||
if (macSize != 64)
|
||||
{
|
||||
goto IL_3F;
|
||||
}
|
||||
}
|
||||
if (macSize == 8)
|
||||
{
|
||||
}
|
||||
if (macSize == 16)
|
||||
{
|
||||
StringBuilder stringBuilder3 = stringBuilder.Append("011");
|
||||
}
|
||||
IL_3F:
|
||||
string text = Convert.ToString(this.Nb_ - 1, 2);
|
||||
int num2;
|
||||
if (text.m_stringLength < 4)
|
||||
{
|
||||
StringBuilder stringBuilder4 = new StringBuilder(text);
|
||||
int num = 0;
|
||||
num2 = stringBuilder4.Insert(num, "0").GetHashCode();
|
||||
}
|
||||
num2 = stringBuilder.GetHashCode();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04007299 RID: 29337
|
||||
[Token(Token = "0x4007299")]
|
||||
private static readonly int BYTES_IN_INT;
|
||||
|
||||
// Token: 0x0400729A RID: 29338
|
||||
[Token(Token = "0x400729A")]
|
||||
private static readonly int BITS_IN_BYTE;
|
||||
|
||||
// Token: 0x0400729B RID: 29339
|
||||
[Token(Token = "0x400729B")]
|
||||
private static readonly int MAX_MAC_BIT_LENGTH;
|
||||
|
||||
// Token: 0x0400729C RID: 29340
|
||||
[Token(Token = "0x400729C")]
|
||||
private static readonly int MIN_MAC_BIT_LENGTH;
|
||||
|
||||
// Token: 0x0400729D RID: 29341
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400729D")]
|
||||
private IBlockCipher engine;
|
||||
|
||||
// Token: 0x0400729E RID: 29342
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400729E")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x0400729F RID: 29343
|
||||
[FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x400729F")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x040072A0 RID: 29344
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072A0")]
|
||||
private byte[] initialAssociatedText;
|
||||
|
||||
// Token: 0x040072A1 RID: 29345
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40072A1")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040072A2 RID: 29346
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40072A2")]
|
||||
private byte[] macBlock;
|
||||
|
||||
// Token: 0x040072A3 RID: 29347
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40072A3")]
|
||||
private byte[] nonce;
|
||||
|
||||
// Token: 0x040072A4 RID: 29348
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40072A4")]
|
||||
private byte[] G1;
|
||||
|
||||
// Token: 0x040072A5 RID: 29349
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40072A5")]
|
||||
private byte[] buffer;
|
||||
|
||||
// Token: 0x040072A6 RID: 29350
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40072A6")]
|
||||
private byte[] s;
|
||||
|
||||
// Token: 0x040072A7 RID: 29351
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x40072A7")]
|
||||
private byte[] counter;
|
||||
|
||||
// Token: 0x040072A8 RID: 29352
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x40072A8")]
|
||||
private readonly MemoryStream associatedText;
|
||||
|
||||
// Token: 0x040072A9 RID: 29353
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x40072A9")]
|
||||
private readonly MemoryStream data;
|
||||
|
||||
// Token: 0x040072AA RID: 29354
|
||||
[FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x40072AA")]
|
||||
private int Nb_;
|
||||
}
|
||||
}
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C3C RID: 7228
|
||||
[Token(Token = "0x2001C3C")]
|
||||
public class KCtrBlockCipher : IStreamCipher, IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B4A5 RID: 46245 RVA: 0x002762F8 File Offset: 0x002744F8
|
||||
[Token(Token = "0x600B4A5")]
|
||||
[Address(RVA = "0x180BBA0", Offset = "0x180A9A0", VA = "0x18180BBA0")]
|
||||
public KCtrBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
this.checkCounter();
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[0];
|
||||
this.IV = array;
|
||||
this.blockSize = array;
|
||||
byte[] array2 = new byte[array];
|
||||
this.ofbV = array2;
|
||||
byte[] array3 = new byte[array2];
|
||||
this.ofbOutV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4A6 RID: 46246 RVA: 0x0027634C File Offset: 0x0027454C
|
||||
[Token(Token = "0x600B4A6")]
|
||||
[Address(RVA = "0x3F63D0", Offset = "0x3F51D0", VA = "0x1803F63D0")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4A7 RID: 46247 RVA: 0x00276360 File Offset: 0x00274560
|
||||
[Token(Token = "0x600B4A7")]
|
||||
[Address(RVA = "0x180B4B0", Offset = "0x180A2B0", VA = "0x18180B4B0", Slot = "10")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B4A7)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCtrBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_95:
|
||||
stloc:ArgumentException(var_14_9F, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Invalid parameter passed")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x17001C80 RID: 7296
|
||||
// (get) Token: 0x0600B4A8 RID: 46248 RVA: 0x00276410 File Offset: 0x00274610
|
||||
[Token(Token = "0x17001C80")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B4A8")]
|
||||
[Address(RVA = "0x180BC80", Offset = "0x180AA80", VA = "0x18180BC80", Slot = "9")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/KCTR";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001C81 RID: 7297
|
||||
// (get) Token: 0x0600B4A9 RID: 46249 RVA: 0x00276438 File Offset: 0x00274638
|
||||
[Token(Token = "0x17001C81")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B4A9")]
|
||||
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "12")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4AA RID: 46250 RVA: 0x00276448 File Offset: 0x00274648
|
||||
[Token(Token = "0x600B4AA")]
|
||||
[Address(RVA = "0x180B460", Offset = "0x180A260", VA = "0x18180B460", Slot = "11")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B4AB RID: 46251 RVA: 0x00276464 File Offset: 0x00274664
|
||||
[Token(Token = "0x600B4AB")]
|
||||
[Address(RVA = "0x180BB90", Offset = "0x180A990", VA = "0x18180BB90", Slot = "6")]
|
||||
public byte ReturnByte(byte input)
|
||||
{
|
||||
return this.CalculateByte(input);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4AC RID: 46252 RVA: 0x00276478 File Offset: 0x00274678
|
||||
[Token(Token = "0x600B4AC")]
|
||||
[Address(RVA = "0x180B9A0", Offset = "0x180A7A0", VA = "0x18180B9A0", Slot = "7")]
|
||||
public void ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
byte b2;
|
||||
byte b = this.CalculateByte(b2);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4AD RID: 46253 RVA: 0x00276494 File Offset: 0x00274694
|
||||
[Token(Token = "0x600B4AD")]
|
||||
[Address(RVA = "0x180B2F0", Offset = "0x180A0F0", VA = "0x18180B2F0")]
|
||||
protected byte CalculateByte(byte b)
|
||||
{
|
||||
int num = this.byteCount;
|
||||
if (num != 0)
|
||||
{
|
||||
byte[] array = this.ofbOutV;
|
||||
int num2 = num + 1;
|
||||
this.byteCount = num2;
|
||||
byte[] array2 = this.ofbV;
|
||||
if (num2 == array2.Length)
|
||||
{
|
||||
int num3 = 0;
|
||||
this.byteCount = num3;
|
||||
}
|
||||
byte b2;
|
||||
return b2;
|
||||
}
|
||||
byte[] array3 = this.ofbV;
|
||||
int num4 = 0;
|
||||
if (num4 < array3.Length)
|
||||
{
|
||||
num4++;
|
||||
if (num4 == array3.Length)
|
||||
{
|
||||
byte[] array4 = this.ofbV;
|
||||
}
|
||||
}
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array5 = this.ofbOutV;
|
||||
int num5 = this.byteCount;
|
||||
byte[] array6 = this.ofbOutV;
|
||||
int num6 = num5 + 1;
|
||||
this.byteCount = num6;
|
||||
byte b3;
|
||||
return b3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4AE RID: 46254 RVA: 0x00276548 File Offset: 0x00274748
|
||||
[Token(Token = "0x600B4AE")]
|
||||
[Address(RVA = "0x180B6D0", Offset = "0x180A4D0", VA = "0x18180B6D0", Slot = "13")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = input.Length;
|
||||
num -= inOff;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
int length = output.Length;
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte b2;
|
||||
byte b = this.CalculateByte(b2);
|
||||
this.ofbOutV = b;
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B4AF RID: 46255 RVA: 0x0027659C File Offset: 0x0027479C
|
||||
[Token(Token = "0x600B4AF")]
|
||||
[Address(RVA = "0x180BB00", Offset = "0x180A900", VA = "0x18180BB00", Slot = "14")]
|
||||
public void Reset()
|
||||
{
|
||||
if (this.initialised)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array = this.ofbV;
|
||||
}
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
this.byteCount = (int)((ulong)0L);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4B0 RID: 46256 RVA: 0x002765D8 File Offset: 0x002747D8
|
||||
[Token(Token = "0x600B4B0")]
|
||||
[Address(RVA = "0x180BCE0", Offset = "0x180AAE0", VA = "0x18180BCE0")]
|
||||
private void incrementCounterAt(int pos)
|
||||
{
|
||||
byte[] array = this.ofbV;
|
||||
if (pos < array.Length && pos == array.Length)
|
||||
{
|
||||
byte[] array2 = this.ofbV;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4B1 RID: 46257 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600B4B1")]
|
||||
[Address(RVA = "0x402080", Offset = "0x400E80", VA = "0x180402080")]
|
||||
private void checkCounter()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x040072AB RID: 29355
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072AB")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x040072AC RID: 29356
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072AC")]
|
||||
private byte[] ofbV;
|
||||
|
||||
// Token: 0x040072AD RID: 29357
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072AD")]
|
||||
private byte[] ofbOutV;
|
||||
|
||||
// Token: 0x040072AE RID: 29358
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40072AE")]
|
||||
private bool initialised;
|
||||
|
||||
// Token: 0x040072AF RID: 29359
|
||||
[FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x40072AF")]
|
||||
private int byteCount;
|
||||
|
||||
// Token: 0x040072B0 RID: 29360
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40072B0")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x040072B1 RID: 29361
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40072B1")]
|
||||
private readonly IBlockCipher cipher;
|
||||
}
|
||||
}
|
||||
+630
@@ -0,0 +1,630 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C3D RID: 7229
|
||||
[Token(Token = "0x2001C3D")]
|
||||
public class OcbBlockCipher : IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x0600B4B2 RID: 46258 RVA: 0x0027660C File Offset: 0x0027480C
|
||||
[Token(Token = "0x600B4B2")]
|
||||
[Address(RVA = "0x180E450", Offset = "0x180D250", VA = "0x18180E450")]
|
||||
public OcbBlockCipher(IBlockCipher hashCipher, IBlockCipher mainCipher)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B4B2)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.OcbBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_68:
|
||||
stloc:ArgumentException(var_5_72, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("'hashCipher' and 'mainCipher' must be the same algorithm")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4B3 RID: 46259 RVA: 0x0027668C File Offset: 0x0027488C
|
||||
[Token(Token = "0x600B4B3")]
|
||||
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "17")]
|
||||
public virtual IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.mainCipher;
|
||||
}
|
||||
|
||||
// Token: 0x17001C82 RID: 7298
|
||||
// (get) Token: 0x0600B4B4 RID: 46260 RVA: 0x002766A0 File Offset: 0x002748A0
|
||||
[Token(Token = "0x17001C82")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B4B4")]
|
||||
[Address(RVA = "0x180E6E0", Offset = "0x180D4E0", VA = "0x18180E6E0", Slot = "18")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.mainCipher;
|
||||
return 0 + "/OCB";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4B5 RID: 46261 RVA: 0x002766C8 File Offset: 0x002748C8
|
||||
[Token(Token = "0x600B4B5")]
|
||||
[Address(RVA = "0x180CFF0", Offset = "0x180BDF0", VA = "0x18180CFF0", Slot = "19")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B4B5)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.OcbBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_1DF:
|
||||
stloc:ArgumentException(var_42_1E9, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("cannot change encrypting state without providing key.")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4B6 RID: 46262 RVA: 0x002768C0 File Offset: 0x00274AC0
|
||||
[Token(Token = "0x600B4B6")]
|
||||
[Address(RVA = "0x180DDF0", Offset = "0x180CBF0", VA = "0x18180DDF0", Slot = "20")]
|
||||
protected virtual int ProcessNonce(byte[] N)
|
||||
{
|
||||
byte[] array = new byte[16];
|
||||
int length = N.Length;
|
||||
int num = 0;
|
||||
int num2 = array.Length;
|
||||
num2 -= length;
|
||||
int num3 = 0;
|
||||
Array.Copy(N, num3, array, num2, length);
|
||||
int num4 = this.macSize;
|
||||
array[0] = (byte)num4;
|
||||
byte b = array[1];
|
||||
array[1] = b;
|
||||
byte[] ktopInput = this.KtopInput;
|
||||
if (ktopInput == 0 || !Arrays.AreEqual(array, ktopInput))
|
||||
{
|
||||
byte[] array2 = new byte[16];
|
||||
IBlockCipher blockCipher = this.hashCipher;
|
||||
this.KtopInput = array;
|
||||
byte[] stretch = this.Stretch;
|
||||
int num5 = 0;
|
||||
int num6 = 0;
|
||||
ulong num7;
|
||||
Array.Copy(array2, num6, stretch, num5, (int)num7);
|
||||
int length2 = array2.Length;
|
||||
byte[] stretch2 = this.Stretch;
|
||||
num++;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B4B7 RID: 46263 RVA: 0x00276988 File Offset: 0x00274B88
|
||||
[Token(Token = "0x600B4B7")]
|
||||
[Address(RVA = "0x4B6B10", Offset = "0x4B5910", VA = "0x1804B6B10", Slot = "21")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4B8 RID: 46264 RVA: 0x00276998 File Offset: 0x00274B98
|
||||
[Token(Token = "0x600B4B8")]
|
||||
[Address(RVA = "0x180CF10", Offset = "0x180BD10", VA = "0x18180CF10", Slot = "22")]
|
||||
public virtual byte[] GetMac()
|
||||
{
|
||||
byte[] array = this.macBlock;
|
||||
if (array == 0)
|
||||
{
|
||||
}
|
||||
return Arrays.Clone(array);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4B9 RID: 46265 RVA: 0x002769B8 File Offset: 0x00274BB8
|
||||
[Token(Token = "0x600B4B9")]
|
||||
[Address(RVA = "0x180CF90", Offset = "0x180BD90", VA = "0x18180CF90", Slot = "23")]
|
||||
public virtual int GetOutputSize(int len)
|
||||
{
|
||||
int num = this.mainBlockPos;
|
||||
int num2 = this.macSize;
|
||||
num += len;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
return num2 + num;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return num - num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4BA RID: 46266 RVA: 0x002769F4 File Offset: 0x00274BF4
|
||||
[Token(Token = "0x600B4BA")]
|
||||
[Address(RVA = "0x180CFC0", Offset = "0x180BDC0", VA = "0x18180CFC0", Slot = "24")]
|
||||
public virtual int GetUpdateOutputSize(int len)
|
||||
{
|
||||
int num = this.mainBlockPos;
|
||||
num += len;
|
||||
int num2;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
num2 = this.macSize;
|
||||
num -= num2;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
return num - num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4BB RID: 46267 RVA: 0x00276A30 File Offset: 0x00274C30
|
||||
[Token(Token = "0x600B4BB")]
|
||||
[Address(RVA = "0x180D800", Offset = "0x180C600", VA = "0x18180D800", Slot = "25")]
|
||||
public virtual void ProcessAadByte(byte input)
|
||||
{
|
||||
byte[] array = this.hashBlock;
|
||||
int num = this.hashBlockPos;
|
||||
int num2 = this.hashBlockPos;
|
||||
byte[] array2 = this.hashBlock;
|
||||
num2++;
|
||||
this.hashBlockPos = num2;
|
||||
if (num2 == array2.Length)
|
||||
{
|
||||
string algorithmName = ((IAeadBlockCipher)this).AlgorithmName;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4BC RID: 46268 RVA: 0x00276A7C File Offset: 0x00274C7C
|
||||
[Token(Token = "0x600B4BC")]
|
||||
[Address(RVA = "0x180D870", Offset = "0x180C670", VA = "0x18180D870", Slot = "26")]
|
||||
public virtual void ProcessAadBytes(byte[] input, int off, int len)
|
||||
{
|
||||
if (len > 0)
|
||||
{
|
||||
byte[] array = this.hashBlock;
|
||||
int num = this.hashBlockPos;
|
||||
int num2 = this.hashBlockPos;
|
||||
byte[] array2 = this.hashBlock;
|
||||
num2++;
|
||||
this.hashBlockPos = num2;
|
||||
if (num2 == array2.Length)
|
||||
{
|
||||
}
|
||||
num2 = off - off;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4BD RID: 46269 RVA: 0x00276ACC File Offset: 0x00274CCC
|
||||
[Token(Token = "0x600B4BD")]
|
||||
[Address(RVA = "0x180D950", Offset = "0x180C750", VA = "0x18180D950", Slot = "27")]
|
||||
public virtual int ProcessByte(byte input, byte[] output, int outOff)
|
||||
{
|
||||
byte[] array = this.mainBlock;
|
||||
int num = this.mainBlockPos;
|
||||
int num2 = this.mainBlockPos;
|
||||
byte[] array2 = this.mainBlock;
|
||||
num2++;
|
||||
this.mainBlockPos = num2;
|
||||
if (num2 != array2.Length)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
this.ProcessHashBlock();
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4BE RID: 46270 RVA: 0x00276B1C File Offset: 0x00274D1C
|
||||
[Token(Token = "0x600B4BE")]
|
||||
[Address(RVA = "0x180D9D0", Offset = "0x180C7D0", VA = "0x18180D9D0", Slot = "28")]
|
||||
public virtual int ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
int num = 0;
|
||||
if (len > 0)
|
||||
{
|
||||
byte[] array = this.mainBlock;
|
||||
int num2 = this.mainBlockPos;
|
||||
int num3 = this.mainBlockPos;
|
||||
byte[] array2 = this.mainBlock;
|
||||
num3++;
|
||||
this.mainBlockPos = num3;
|
||||
if (num3 == array2.Length)
|
||||
{
|
||||
this.ProcessHashBlock();
|
||||
num += 16;
|
||||
}
|
||||
num3 = inOff - inOff;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4BF RID: 46271 RVA: 0x00276B84 File Offset: 0x00274D84
|
||||
[Token(Token = "0x600B4BF")]
|
||||
[Address(RVA = "0x180C790", Offset = "0x180B590", VA = "0x18180C790", Slot = "29")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B4BF)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.OcbBlockCipher::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_205:
|
||||
stloc:InvalidCipherTextException(var_40_20F, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in OCB failed")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4C0 RID: 46272 RVA: 0x00276DA4 File Offset: 0x00274FA4
|
||||
[Token(Token = "0x600B4C0")]
|
||||
[Address(RVA = "0x180E1A0", Offset = "0x180CFA0", VA = "0x18180E1A0", Slot = "30")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
string algorithmName = ((IAeadBlockCipher)this).AlgorithmName;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4C1 RID: 46273 RVA: 0x00276DB8 File Offset: 0x00274FB8
|
||||
[Token(Token = "0x600B4C1")]
|
||||
[Address(RVA = "0x180C770", Offset = "0x180B570", VA = "0x18180C770", Slot = "31")]
|
||||
protected virtual void Clear(byte[] bs)
|
||||
{
|
||||
if (bs != 0)
|
||||
{
|
||||
int length = bs.Length;
|
||||
int num = 0;
|
||||
Array.Clear(bs, num, length);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4C2 RID: 46274 RVA: 0x00276DDC File Offset: 0x00274FDC
|
||||
[Token(Token = "0x600B4C2")]
|
||||
[Address(RVA = "0x180CC10", Offset = "0x180BA10", VA = "0x18180CC10", Slot = "32")]
|
||||
protected virtual byte[] GetLSub(int n)
|
||||
{
|
||||
int num;
|
||||
int num4;
|
||||
do
|
||||
{
|
||||
IList l = this.L;
|
||||
num = 0;
|
||||
num += num;
|
||||
num++;
|
||||
IList l2 = this.L;
|
||||
uint num2;
|
||||
if (num < (int)num2)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
uint num3;
|
||||
if (num < (int)num3)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
num4 = 0;
|
||||
if (num == 0)
|
||||
{
|
||||
num++;
|
||||
num += 19;
|
||||
num++;
|
||||
num += 19;
|
||||
num += 19;
|
||||
}
|
||||
}
|
||||
while (num == 0);
|
||||
if (num < num4)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
IList l3 = this.L;
|
||||
byte[] array;
|
||||
array += array;
|
||||
byte b;
|
||||
return b;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4C3 RID: 46275 RVA: 0x00276E5C File Offset: 0x0027505C
|
||||
[Token(Token = "0x600B4C3")]
|
||||
[Address(RVA = "0x180DAD0", Offset = "0x180C8D0", VA = "0x18180DAD0", Slot = "33")]
|
||||
protected virtual void ProcessHashBlock()
|
||||
{
|
||||
long num = this.hashBlockCount;
|
||||
this.hashBlockCount = num;
|
||||
int num2 = 0;
|
||||
num2++;
|
||||
this.hashBlockPos = (int)((ulong)0L);
|
||||
}
|
||||
|
||||
// Token: 0x0600B4C4 RID: 46276 RVA: 0x00276E88 File Offset: 0x00275088
|
||||
[Token(Token = "0x600B4C4")]
|
||||
[Address(RVA = "0x180DB40", Offset = "0x180C940", VA = "0x18180DB40", Slot = "34")]
|
||||
protected virtual void ProcessMainBlock(byte[] output, int outOff)
|
||||
{
|
||||
int num = 0;
|
||||
Check.DataLength(output, outOff, 16, "Output buffer too short");
|
||||
if ((this.forEncryption ? 1 : 0) != num)
|
||||
{
|
||||
byte[] array = this.mainBlock;
|
||||
OcbBlockCipher.Xor(this.Checksum, array);
|
||||
this.mainBlockPos = num;
|
||||
}
|
||||
long num2 = this.mainBlockCount;
|
||||
byte[] offsetMAIN = this.OffsetMAIN;
|
||||
this.mainBlockCount = num2;
|
||||
if ((this.forEncryption ? 1 : 0) != num)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
byte[] array2 = this.mainBlock;
|
||||
byte[] offsetMAIN2 = this.OffsetMAIN;
|
||||
IBlockCipher blockCipher = this.mainCipher;
|
||||
byte[] array3 = this.mainBlock;
|
||||
byte[] array4 = this.mainBlock;
|
||||
byte[] offsetMAIN3 = this.OffsetMAIN;
|
||||
byte[] array5 = this.mainBlock;
|
||||
int num3 = 0;
|
||||
ulong num4;
|
||||
Array.Copy(array5, num3, output, outOff, (int)num4);
|
||||
if ((this.forEncryption ? 1 : 0) == num)
|
||||
{
|
||||
byte[] array6 = this.mainBlock;
|
||||
OcbBlockCipher.Xor(this.Checksum, array6);
|
||||
byte[] array7 = this.mainBlock;
|
||||
int num5 = 0;
|
||||
int num6 = this.macSize;
|
||||
Array.Copy(array7, 16, array7, num5, num6);
|
||||
int num7 = this.macSize;
|
||||
this.mainBlockPos = num7;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4C5 RID: 46277 RVA: 0x00276F88 File Offset: 0x00275188
|
||||
[Token(Token = "0x600B4C5")]
|
||||
[Address(RVA = "0x180E030", Offset = "0x180CE30", VA = "0x18180E030", Slot = "35")]
|
||||
protected virtual void Reset(bool clearMac)
|
||||
{
|
||||
IBlockCipher blockCipher = this.hashCipher;
|
||||
IBlockCipher blockCipher2 = this.mainCipher;
|
||||
this.Reset();
|
||||
this.Reset();
|
||||
int num = 0;
|
||||
this.hashBlockPos = num;
|
||||
this.hashBlockCount = (long)num;
|
||||
this.mainBlockCount = (long)num;
|
||||
this.Reset();
|
||||
this.Reset();
|
||||
byte[] offsetMAIN = this.OffsetMAIN;
|
||||
int num2 = 0;
|
||||
byte[] offsetMAIN_ = this.OffsetMAIN_0;
|
||||
int num3 = 0;
|
||||
ulong num4;
|
||||
Array.Copy(offsetMAIN_, num3, offsetMAIN, num2, (int)num4);
|
||||
this.Reset();
|
||||
if (clearMac)
|
||||
{
|
||||
this.macBlock = num;
|
||||
}
|
||||
byte[] array = this.initialAssociatedText;
|
||||
if (array != 0)
|
||||
{
|
||||
this.ProcessAadByte(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4C6 RID: 46278 RVA: 0x00277024 File Offset: 0x00275224
|
||||
[Token(Token = "0x600B4C6")]
|
||||
[Address(RVA = "0x180E240", Offset = "0x180D040", VA = "0x18180E240", Slot = "36")]
|
||||
protected virtual void UpdateHASH(byte[] LSub)
|
||||
{
|
||||
byte[] offsetHASH = this.OffsetHASH;
|
||||
byte[] offsetHASH2 = this.OffsetHASH;
|
||||
byte[] array = this.hashBlock;
|
||||
IBlockCipher blockCipher = this.hashCipher;
|
||||
byte[] array2 = this.hashBlock;
|
||||
byte[] sum = this.Sum;
|
||||
byte[] array3 = this.hashBlock;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4C7 RID: 46279 RVA: 0x00277070 File Offset: 0x00275270
|
||||
[Token(Token = "0x600B4C7")]
|
||||
[Address(RVA = "0x180D670", Offset = "0x180C470", VA = "0x18180D670")]
|
||||
protected static byte[] OCB_double(byte[] block)
|
||||
{
|
||||
byte[] array = new byte[16];
|
||||
byte b;
|
||||
b += b;
|
||||
uint num;
|
||||
num -= (uint)b;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4C8 RID: 46280 RVA: 0x00277094 File Offset: 0x00275294
|
||||
[Token(Token = "0x600B4C8")]
|
||||
[Address(RVA = "0x180D760", Offset = "0x180C560", VA = "0x18180D760")]
|
||||
protected static void OCB_extend(byte[] block, int pos)
|
||||
{
|
||||
int num = pos + 1;
|
||||
if (num < 16)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4C9 RID: 46281 RVA: 0x002770B4 File Offset: 0x002752B4
|
||||
[Token(Token = "0x600B4C9")]
|
||||
[Address(RVA = "0x180D7D0", Offset = "0x180C5D0", VA = "0x18180D7D0")]
|
||||
protected static int OCB_ntz(long x)
|
||||
{
|
||||
int num = 0;
|
||||
return num + 1;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4CA RID: 46282 RVA: 0x002770CC File Offset: 0x002752CC
|
||||
[Token(Token = "0x600B4CA")]
|
||||
[Address(RVA = "0x180E1C0", Offset = "0x180CFC0", VA = "0x18180E1C0")]
|
||||
protected static int ShiftLeft(byte[] block, byte[] output)
|
||||
{
|
||||
byte b;
|
||||
b += b;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B4CB RID: 46283 RVA: 0x002770E4 File Offset: 0x002752E4
|
||||
[Token(Token = "0x600B4CB")]
|
||||
[Address(RVA = "0x180E3E0", Offset = "0x180D1E0", VA = "0x18180E3E0")]
|
||||
protected static void Xor(byte[] block, byte[] val)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x040072B2 RID: 29362
|
||||
[Token(Token = "0x40072B2")]
|
||||
private const int BLOCK_SIZE = 16;
|
||||
|
||||
// Token: 0x040072B3 RID: 29363
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072B3")]
|
||||
private readonly IBlockCipher hashCipher;
|
||||
|
||||
// Token: 0x040072B4 RID: 29364
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072B4")]
|
||||
private readonly IBlockCipher mainCipher;
|
||||
|
||||
// Token: 0x040072B5 RID: 29365
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072B5")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x040072B6 RID: 29366
|
||||
[FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x40072B6")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x040072B7 RID: 29367
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40072B7")]
|
||||
private byte[] initialAssociatedText;
|
||||
|
||||
// Token: 0x040072B8 RID: 29368
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40072B8")]
|
||||
private IList L;
|
||||
|
||||
// Token: 0x040072B9 RID: 29369
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40072B9")]
|
||||
private byte[] L_Asterisk;
|
||||
|
||||
// Token: 0x040072BA RID: 29370
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40072BA")]
|
||||
private byte[] L_Dollar;
|
||||
|
||||
// Token: 0x040072BB RID: 29371
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40072BB")]
|
||||
private byte[] KtopInput;
|
||||
|
||||
// Token: 0x040072BC RID: 29372
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40072BC")]
|
||||
private byte[] Stretch;
|
||||
|
||||
// Token: 0x040072BD RID: 29373
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x40072BD")]
|
||||
private byte[] OffsetMAIN_0;
|
||||
|
||||
// Token: 0x040072BE RID: 29374
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x40072BE")]
|
||||
private byte[] hashBlock;
|
||||
|
||||
// Token: 0x040072BF RID: 29375
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x40072BF")]
|
||||
private byte[] mainBlock;
|
||||
|
||||
// Token: 0x040072C0 RID: 29376
|
||||
[FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x40072C0")]
|
||||
private int hashBlockPos;
|
||||
|
||||
// Token: 0x040072C1 RID: 29377
|
||||
[FieldOffset(Offset = "0x74")]
|
||||
[Token(Token = "0x40072C1")]
|
||||
private int mainBlockPos;
|
||||
|
||||
// Token: 0x040072C2 RID: 29378
|
||||
[FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x40072C2")]
|
||||
private long hashBlockCount;
|
||||
|
||||
// Token: 0x040072C3 RID: 29379
|
||||
[FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x40072C3")]
|
||||
private long mainBlockCount;
|
||||
|
||||
// Token: 0x040072C4 RID: 29380
|
||||
[FieldOffset(Offset = "0x88")]
|
||||
[Token(Token = "0x40072C4")]
|
||||
private byte[] OffsetHASH;
|
||||
|
||||
// Token: 0x040072C5 RID: 29381
|
||||
[FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x40072C5")]
|
||||
private byte[] Sum;
|
||||
|
||||
// Token: 0x040072C6 RID: 29382
|
||||
[FieldOffset(Offset = "0x98")]
|
||||
[Token(Token = "0x40072C6")]
|
||||
private byte[] OffsetMAIN;
|
||||
|
||||
// Token: 0x040072C7 RID: 29383
|
||||
[FieldOffset(Offset = "0xA0")]
|
||||
[Token(Token = "0x40072C7")]
|
||||
private byte[] Checksum;
|
||||
|
||||
// Token: 0x040072C8 RID: 29384
|
||||
[FieldOffset(Offset = "0xA8")]
|
||||
[Token(Token = "0x40072C8")]
|
||||
private byte[] macBlock;
|
||||
}
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C3E RID: 7230
|
||||
[Token(Token = "0x2001C3E")]
|
||||
public class OfbBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B4CC RID: 46284 RVA: 0x002770F8 File Offset: 0x002752F8
|
||||
[Token(Token = "0x600B4CC")]
|
||||
[Address(RVA = "0x180EBE0", Offset = "0x180D9E0", VA = "0x18180EBE0")]
|
||||
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: 0x0600B4CD RID: 46285 RVA: 0x0027714C File Offset: 0x0027534C
|
||||
[Token(Token = "0x600B4CD")]
|
||||
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4CE RID: 46286 RVA: 0x00277160 File Offset: 0x00275360
|
||||
[Token(Token = "0x600B4CE")]
|
||||
[Address(RVA = "0x180E740", Offset = "0x180D540", VA = "0x18180E740", 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: 0x17001C83 RID: 7299
|
||||
// (get) Token: 0x0600B4CF RID: 46287 RVA: 0x0027721C File Offset: 0x0027541C
|
||||
[Token(Token = "0x17001C83")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B4CF")]
|
||||
[Address(RVA = "0x180ECC0", Offset = "0x180DAC0", VA = "0x18180ECC0", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001C84 RID: 7300
|
||||
// (get) Token: 0x0600B4D0 RID: 46288 RVA: 0x00277240 File Offset: 0x00275440
|
||||
[Token(Token = "0x17001C84")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B4D0")]
|
||||
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4D1 RID: 46289 RVA: 0x00277250 File Offset: 0x00275450
|
||||
[Token(Token = "0x600B4D1")]
|
||||
[Address(RVA = "0x42EE50", Offset = "0x42DC50", VA = "0x18042EE50", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4D2 RID: 46290 RVA: 0x00277264 File Offset: 0x00275464
|
||||
[Token(Token = "0x600B4D2")]
|
||||
[Address(RVA = "0x180E960", Offset = "0x180D760", VA = "0x18180E960", 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: 0x0600B4D3 RID: 46291 RVA: 0x0027730C File Offset: 0x0027550C
|
||||
[Token(Token = "0x600B4D3")]
|
||||
[Address(RVA = "0x180EB70", Offset = "0x180D970", VA = "0x18180EB70", 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: 0x040072C9 RID: 29385
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072C9")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x040072CA RID: 29386
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072CA")]
|
||||
private byte[] ofbV;
|
||||
|
||||
// Token: 0x040072CB RID: 29387
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072CB")]
|
||||
private byte[] ofbOutV;
|
||||
|
||||
// Token: 0x040072CC RID: 29388
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40072CC")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x040072CD RID: 29389
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40072CD")]
|
||||
private readonly IBlockCipher cipher;
|
||||
}
|
||||
}
|
||||
+339
@@ -0,0 +1,339 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C3F RID: 7231
|
||||
[Token(Token = "0x2001C3F")]
|
||||
public class OpenPgpCfbBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B4D4 RID: 46292 RVA: 0x0027734C File Offset: 0x0027554C
|
||||
[Token(Token = "0x600B4D4")]
|
||||
[Address(RVA = "0x180FEA0", Offset = "0x180ECA0", VA = "0x18180FEA0")]
|
||||
public OpenPgpCfbBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[0];
|
||||
int num = this.blockSize;
|
||||
this.IV = array;
|
||||
byte[] array2 = new byte[num];
|
||||
int num2 = this.blockSize;
|
||||
this.FR = array2;
|
||||
byte[] array3 = new byte[num2];
|
||||
this.FRE = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4D5 RID: 46293 RVA: 0x002773A8 File Offset: 0x002755A8
|
||||
[Token(Token = "0x600B4D5")]
|
||||
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x17001C85 RID: 7301
|
||||
// (get) Token: 0x0600B4D6 RID: 46294 RVA: 0x002773BC File Offset: 0x002755BC
|
||||
[Token(Token = "0x17001C85")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B4D6")]
|
||||
[Address(RVA = "0x180FF40", Offset = "0x180ED40", VA = "0x18180FF40", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/OpenPGPCFB";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001C86 RID: 7302
|
||||
// (get) Token: 0x0600B4D7 RID: 46295 RVA: 0x002773E4 File Offset: 0x002755E4
|
||||
[Token(Token = "0x17001C86")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B4D7")]
|
||||
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4D8 RID: 46296 RVA: 0x002773F4 File Offset: 0x002755F4
|
||||
[Token(Token = "0x600B4D8")]
|
||||
[Address(RVA = "0x180FB70", Offset = "0x180E970", VA = "0x18180FB70", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B4D9 RID: 46297 RVA: 0x00277410 File Offset: 0x00275610
|
||||
[Token(Token = "0x600B4D9")]
|
||||
[Address(RVA = "0x180FDF0", Offset = "0x180EBF0", VA = "0x18180FDF0", Slot = "8")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
if (this.forEncryption)
|
||||
{
|
||||
int num;
|
||||
return num;
|
||||
}
|
||||
int num2;
|
||||
return num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4DA RID: 46298 RVA: 0x0027742C File Offset: 0x0027562C
|
||||
[Token(Token = "0x600B4DA")]
|
||||
[Address(RVA = "0x180FE20", Offset = "0x180EC20", VA = "0x18180FE20", Slot = "9")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] fr = this.FR;
|
||||
int num = 0;
|
||||
this.count = num;
|
||||
byte[] iv = this.IV;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
int length = fr.Length;
|
||||
Array.Copy(iv, num3, fr, num2, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B4DB RID: 46299 RVA: 0x00277478 File Offset: 0x00275678
|
||||
[Token(Token = "0x600B4DB")]
|
||||
[Address(RVA = "0x180FBC0", Offset = "0x180E9C0", VA = "0x18180FBC0", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
this.forEncryption = forEncryption;
|
||||
if (parameters == 0 || parameters == 0)
|
||||
{
|
||||
goto IL_46;
|
||||
}
|
||||
}
|
||||
while (parameters == 0);
|
||||
byte[] iv = this.IV;
|
||||
byte[] array;
|
||||
int length = array.Length;
|
||||
int length2 = iv.Length;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(array, num2, iv, num3, length2);
|
||||
IL_46:
|
||||
byte[] fr = this.FR;
|
||||
this.count = num;
|
||||
int length3 = fr.Length;
|
||||
int num4 = 0;
|
||||
byte[] iv2 = this.IV;
|
||||
int num5 = 0;
|
||||
Array.Copy(iv2, num5, fr, num4, length3);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4DC RID: 46300 RVA: 0x00277518 File Offset: 0x00275718
|
||||
[Token(Token = "0x600B4DC")]
|
||||
[Address(RVA = "0x180FB30", Offset = "0x180E930", VA = "0x18180FB30")]
|
||||
private byte EncryptByte(byte data, int blockOff)
|
||||
{
|
||||
byte[] fre = this.FRE;
|
||||
byte b;
|
||||
return b;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4DD RID: 46301 RVA: 0x00277534 File Offset: 0x00275734
|
||||
[Token(Token = "0x600B4DD")]
|
||||
[Address(RVA = "0x180F480", Offset = "0x180E280", VA = "0x18180F480")]
|
||||
private int EncryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num;
|
||||
int num2;
|
||||
byte[] fre5;
|
||||
for (;;)
|
||||
{
|
||||
num = this.blockSize;
|
||||
int length = input.Length;
|
||||
int length2 = outBytes.Length;
|
||||
num2 = this.count;
|
||||
if (num2 != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] fre = this.FRE;
|
||||
int num3 = 0;
|
||||
if (this.blockSize > 0)
|
||||
{
|
||||
byte[] fr = this.FR;
|
||||
byte[] fre2 = this.FRE;
|
||||
byte b = fre[input];
|
||||
num3++;
|
||||
int num4 = this.blockSize;
|
||||
byte[] fr2 = this.FR;
|
||||
byte[] fre3 = this.FRE;
|
||||
num4 += -2;
|
||||
byte b2;
|
||||
fr2[0] = b2;
|
||||
int num5 = inOff + 1;
|
||||
byte[] fr3 = this.FR;
|
||||
byte[] fre4 = this.FRE;
|
||||
int num6 = this.blockSize;
|
||||
byte b3;
|
||||
fr3[0] = b3;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
fre5 = this.FRE;
|
||||
if (this.blockSize > 2)
|
||||
{
|
||||
goto Block_4;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (num2 == num)
|
||||
{
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte[] fre6 = this.FRE;
|
||||
byte[] fre7 = this.FRE;
|
||||
int num7 = inOff + 1;
|
||||
byte[] fre8 = this.FRE;
|
||||
int num8 = this.blockSize;
|
||||
int num9 = 0;
|
||||
byte[] fr4 = this.FR;
|
||||
Array.Copy(fr4, 2, fr4, num9, num8);
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
byte[] fre9 = this.FRE;
|
||||
if (this.blockSize > 2)
|
||||
{
|
||||
byte[] fr5 = this.FR;
|
||||
byte[] fre10 = this.FRE;
|
||||
byte b4;
|
||||
fre9[0] = b4;
|
||||
int num10 = this.blockSize;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
Block_4:
|
||||
byte[] fr6 = this.FR;
|
||||
byte[] fre11 = this.FRE;
|
||||
byte b5;
|
||||
fre5[0] = b5;
|
||||
int num11 = this.blockSize;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B4DE RID: 46302 RVA: 0x002776C8 File Offset: 0x002758C8
|
||||
[Token(Token = "0x600B4DE")]
|
||||
[Address(RVA = "0x180ED50", Offset = "0x180DB50", VA = "0x18180ED50")]
|
||||
private int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num;
|
||||
int num2;
|
||||
byte[] fre5;
|
||||
for (;;)
|
||||
{
|
||||
num = this.blockSize;
|
||||
int length = input.Length;
|
||||
num2 = this.count;
|
||||
if (num2 != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] fre = this.FRE;
|
||||
int num3 = 0;
|
||||
if (this.blockSize > 0)
|
||||
{
|
||||
byte[] fr = this.FR;
|
||||
byte[] fre2 = this.FRE;
|
||||
num3++;
|
||||
int num4 = this.blockSize;
|
||||
byte[] fr2 = this.FR;
|
||||
byte[] fre3 = this.FRE;
|
||||
int num5 = this.blockSize;
|
||||
int num6 = inOff + 1;
|
||||
byte[] fr3 = this.FR;
|
||||
int num7 = this.blockSize;
|
||||
byte[] fre4 = this.FRE;
|
||||
int num8 = this.blockSize;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
fre5 = this.FRE;
|
||||
if (this.blockSize > 2)
|
||||
{
|
||||
goto Block_4;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (num2 == num)
|
||||
{
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte[] fre6 = this.FRE;
|
||||
int length2 = input.Length;
|
||||
int num9 = inOff + 1;
|
||||
byte[] fre7 = this.FRE;
|
||||
byte[] fre8 = this.FRE;
|
||||
int num10 = 0;
|
||||
int num11 = this.blockSize;
|
||||
byte[] fr4 = this.FR;
|
||||
Array.Copy(fr4, 2, fr4, num10, num11);
|
||||
byte[] fr5 = this.FR;
|
||||
int num12 = this.blockSize;
|
||||
byte[] fr6 = this.FR;
|
||||
int num13 = this.blockSize;
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
byte[] fre9 = this.FRE;
|
||||
if (this.blockSize > 2)
|
||||
{
|
||||
byte[] fr7 = this.FR;
|
||||
byte b = fre9[input];
|
||||
fre9[0] = b;
|
||||
byte[] fre10 = this.FRE;
|
||||
int num14 = this.blockSize;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
Block_4:
|
||||
byte[] fr8 = this.FR;
|
||||
byte b2 = fre5[input];
|
||||
fre5[0] = b2;
|
||||
byte[] fre11 = this.FRE;
|
||||
int num15 = this.blockSize;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040072CE RID: 29390
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072CE")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x040072CF RID: 29391
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072CF")]
|
||||
private byte[] FR;
|
||||
|
||||
// Token: 0x040072D0 RID: 29392
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072D0")]
|
||||
private byte[] FRE;
|
||||
|
||||
// Token: 0x040072D1 RID: 29393
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40072D1")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040072D2 RID: 29394
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40072D2")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x040072D3 RID: 29395
|
||||
[FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x40072D3")]
|
||||
private int count;
|
||||
|
||||
// Token: 0x040072D4 RID: 29396
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40072D4")]
|
||||
private bool forEncryption;
|
||||
}
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001C40 RID: 7232
|
||||
[Token(Token = "0x2001C40")]
|
||||
public class SicBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B4DF RID: 46303 RVA: 0x0027787C File Offset: 0x00275A7C
|
||||
[Token(Token = "0x600B4DF")]
|
||||
[Address(RVA = "0x1812F40", Offset = "0x1811D40", VA = "0x181812F40")]
|
||||
public SicBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[0];
|
||||
int num = this.blockSize;
|
||||
this.counter = array;
|
||||
byte[] array2 = new byte[num];
|
||||
int num2 = this.blockSize;
|
||||
this.counterOut = array2;
|
||||
byte[] array3 = new byte[num2];
|
||||
this.IV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4E0 RID: 46304 RVA: 0x002778D8 File Offset: 0x00275AD8
|
||||
[Token(Token = "0x600B4E0")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "10")]
|
||||
public virtual IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4E1 RID: 46305 RVA: 0x002778EC File Offset: 0x00275AEC
|
||||
[Token(Token = "0x600B4E1")]
|
||||
[Address(RVA = "0x1812A70", Offset = "0x1811870", VA = "0x181812A70", Slot = "11")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B4E1)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.SicBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_5C:
|
||||
stloc:ArgumentException(var_10_6B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CTR/SIC mode requires ParametersWithIV"), ldstr:string("parameters")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x17001C87 RID: 7303
|
||||
// (get) Token: 0x0600B4E2 RID: 46306 RVA: 0x00277968 File Offset: 0x00275B68
|
||||
[Token(Token = "0x17001C87")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B4E2")]
|
||||
[Address(RVA = "0x1812FE0", Offset = "0x1811DE0", VA = "0x181812FE0", Slot = "12")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/SIC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001C88 RID: 7304
|
||||
// (get) Token: 0x0600B4E3 RID: 46307 RVA: 0x00277990 File Offset: 0x00275B90
|
||||
[Token(Token = "0x17001C88")]
|
||||
public virtual bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B4E3")]
|
||||
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "13")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B4E4 RID: 46308 RVA: 0x002779A0 File Offset: 0x00275BA0
|
||||
[Token(Token = "0x600B4E4")]
|
||||
[Address(RVA = "0x1812A20", Offset = "0x1811820", VA = "0x181812A20", Slot = "14")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B4E5 RID: 46309 RVA: 0x002779BC File Offset: 0x00275BBC
|
||||
[Token(Token = "0x600B4E5")]
|
||||
[Address(RVA = "0x1812CF0", Offset = "0x1811AF0", VA = "0x181812CF0", Slot = "15")]
|
||||
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array = this.counterOut;
|
||||
int num = 0;
|
||||
byte[] array2 = this.counterOut;
|
||||
if (num < array2.Length)
|
||||
{
|
||||
byte[] array3 = this.counterOut;
|
||||
}
|
||||
int length = this.counter.Length;
|
||||
byte[] array4 = this.counter;
|
||||
while (length == array4.Length)
|
||||
{
|
||||
}
|
||||
return this.counter.Length;
|
||||
}
|
||||
|
||||
// Token: 0x0600B4E6 RID: 46310 RVA: 0x00277A24 File Offset: 0x00275C24
|
||||
[Token(Token = "0x600B4E6")]
|
||||
[Address(RVA = "0x1812E90", Offset = "0x1811C90", VA = "0x181812E90", Slot = "16")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
byte[] array = this.counter;
|
||||
int num = 0;
|
||||
Arrays.Fill(array, (byte)num);
|
||||
byte[] iv = this.IV;
|
||||
int length = iv.Length;
|
||||
int num2 = 0;
|
||||
byte[] array2 = this.counter;
|
||||
int num3 = 0;
|
||||
Array.Copy(iv, num3, array2, num2, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040072D5 RID: 29397
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072D5")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040072D6 RID: 29398
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072D6")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x040072D7 RID: 29399
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072D7")]
|
||||
private readonly byte[] counter;
|
||||
|
||||
// Token: 0x040072D8 RID: 29400
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40072D8")]
|
||||
private readonly byte[] counterOut;
|
||||
|
||||
// Token: 0x040072D9 RID: 29401
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40072D9")]
|
||||
private byte[] IV;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user