scripts
This commit is contained in:
@@ -0,0 +1,263 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x0200166C RID: 5740
|
||||
[Token(Token = "0x200166C")]
|
||||
[StructLayout(3)]
|
||||
public class CMac : IMac
|
||||
{
|
||||
// Token: 0x06009944 RID: 39236 RVA: 0x00221338 File Offset: 0x0021F538
|
||||
[Token(Token = "0x6009944")]
|
||||
[Address(RVA = "0x20E4690", Offset = "0x20E3090", VA = "0x1820E4690")]
|
||||
public CMac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009945 RID: 39237 RVA: 0x0022134C File Offset: 0x0021F54C
|
||||
[Token(Token = "0x6009945")]
|
||||
[Address(RVA = "0x20E4700", Offset = "0x20E3100", VA = "0x1820E4700")]
|
||||
public CMac(IBlockCipher cipher, int macSizeInBits)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009945)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.CMac::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_63:
|
||||
stloc:ArgumentException(var_6_6D, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Block size must be either 64 or 128 bits")))
|
||||
}
|
||||
|
||||
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: 0x17001888 RID: 6280
|
||||
// (get) Token: 0x06009946 RID: 39238 RVA: 0x002213C8 File Offset: 0x0021F5C8
|
||||
[Token(Token = "0x17001888")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x6009946")]
|
||||
[Address(RVA = "0x20E4960", Offset = "0x20E3360", VA = "0x1820E4960", Slot = "5")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009947 RID: 39239 RVA: 0x002213E4 File Offset: 0x0021F5E4
|
||||
[Token(Token = "0x6009947")]
|
||||
[Address(RVA = "0x20E4560", Offset = "0x20E2F60", VA = "0x1820E4560")]
|
||||
private static int ShiftLeft(byte[] block, byte[] output)
|
||||
{
|
||||
int length = block.Length;
|
||||
byte b;
|
||||
b += b;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009948 RID: 39240 RVA: 0x00221404 File Offset: 0x0021F604
|
||||
[Token(Token = "0x6009948")]
|
||||
[Address(RVA = "0x20E4230", Offset = "0x20E2C30", VA = "0x1820E4230")]
|
||||
private static byte[] DoubleLu(byte[] input)
|
||||
{
|
||||
byte[] array = new byte[input.Length];
|
||||
int num = input.Length - 1;
|
||||
byte b;
|
||||
b += b;
|
||||
num = input.Length;
|
||||
uint num2;
|
||||
num2 -= (uint)b;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06009949 RID: 39241 RVA: 0x0022143C File Offset: 0x0021F63C
|
||||
[Token(Token = "0x6009949")]
|
||||
[Address(RVA = "0x20E4340", Offset = "0x20E2D40", VA = "0x1820E4340", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009949)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.CMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_8F:
|
||||
stloc:ArgumentException(var_12_9E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CMac mode only permits key to be set."), 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.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: 0x0600994A RID: 39242 RVA: 0x002214E8 File Offset: 0x0021F6E8
|
||||
[Token(Token = "0x600994A")]
|
||||
[Address(RVA = "0x3D3FF0", Offset = "0x3D29F0", VA = "0x1803D3FF0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600994B RID: 39243 RVA: 0x002214FC File Offset: 0x0021F6FC
|
||||
[Token(Token = "0x600994B")]
|
||||
[Address(RVA = "0x20E45E0", Offset = "0x20E2FE0", VA = "0x1820E45E0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
if (num == array.Length)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
}
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600994C RID: 39244 RVA: 0x00221548 File Offset: 0x0021F748
|
||||
[Token(Token = "0x600994C")]
|
||||
[Address(RVA = "0x20E3E40", Offset = "0x20E2840", VA = "0x1820E3E40", Slot = "8")]
|
||||
public void BlockUpdate(byte[] inBytes, int inOff, int len)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.bufOff;
|
||||
int num2 = 0;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
this.bufOff = num2;
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
if (num2 < blockCipher2)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
byte[] array2 = this.buf;
|
||||
Array.Copy(inBytes, inOff, array2, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600994D RID: 39245 RVA: 0x002215B0 File Offset: 0x0021F7B0
|
||||
[Token(Token = "0x600994D")]
|
||||
[Address(RVA = "0x20E4050", Offset = "0x20E2A50", VA = "0x1820E4050", Slot = "9")]
|
||||
public int DoFinal(byte[] outBytes, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
ISO7816d4Padding iso7816d4Padding = new ISO7816d4Padding();
|
||||
int num = this.bufOff;
|
||||
byte[] array = this.buf;
|
||||
int num2 = iso7816d4Padding.AddPadding(array, num);
|
||||
byte[] lu = this.Lu;
|
||||
byte[] array2 = this.mac;
|
||||
int num3 = 0;
|
||||
if (num3 < array2.Length)
|
||||
{
|
||||
byte[] array3 = this.buf;
|
||||
num3++;
|
||||
byte[] array4 = this.mac;
|
||||
}
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
int num4 = this.macSize;
|
||||
byte[] array5 = this.mac;
|
||||
int num5 = 0;
|
||||
Array.Copy(array5, num5, outBytes, outOff, num4);
|
||||
byte[] array6 = this.buf;
|
||||
int length = array6.Length;
|
||||
int num6 = 0;
|
||||
Array.Clear(array6, num6, length);
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
this.bufOff = num3;
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600994E RID: 39246 RVA: 0x0022167C File Offset: 0x0021F87C
|
||||
[Token(Token = "0x600994E")]
|
||||
[Address(RVA = "0x20E44F0", Offset = "0x20E2EF0", VA = "0x1820E44F0", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040064A2 RID: 25762
|
||||
[Token(Token = "0x40064A2")]
|
||||
private const byte CONSTANT_128 = 135;
|
||||
|
||||
// Token: 0x040064A3 RID: 25763
|
||||
[Token(Token = "0x40064A3")]
|
||||
private const byte CONSTANT_64 = 27;
|
||||
|
||||
// Token: 0x040064A4 RID: 25764
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064A4")]
|
||||
private byte[] ZEROES;
|
||||
|
||||
// Token: 0x040064A5 RID: 25765
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064A5")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040064A6 RID: 25766
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40064A6")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040064A7 RID: 25767
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40064A7")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040064A8 RID: 25768
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40064A8")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040064A9 RID: 25769
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40064A9")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x040064AA RID: 25770
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40064AA")]
|
||||
private byte[] L;
|
||||
|
||||
// Token: 0x040064AB RID: 25771
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40064AB")]
|
||||
private byte[] Lu;
|
||||
|
||||
// Token: 0x040064AC RID: 25772
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40064AC")]
|
||||
private byte[] Lu2;
|
||||
}
|
||||
}
|
||||
+215
@@ -0,0 +1,215 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x0200166D RID: 5741
|
||||
[Token(Token = "0x200166D")]
|
||||
[StructLayout(3)]
|
||||
public class CbcBlockCipherMac : IMac
|
||||
{
|
||||
// Token: 0x0600994F RID: 39247 RVA: 0x002216B8 File Offset: 0x0021F8B8
|
||||
[Token(Token = "0x600994F")]
|
||||
[Address(RVA = "0x20E5120", Offset = "0x20E3B20", VA = "0x1820E5120")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009950 RID: 39248 RVA: 0x002216CC File Offset: 0x0021F8CC
|
||||
[Token(Token = "0x6009950")]
|
||||
[Address(RVA = "0x20E5070", Offset = "0x20E3A70", VA = "0x1820E5070")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher, IBlockCipherPadding padding)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009951 RID: 39249 RVA: 0x002216E0 File Offset: 0x0021F8E0
|
||||
[Token(Token = "0x6009951")]
|
||||
[Address(RVA = "0x20E5100", Offset = "0x20E3B00", VA = "0x1820E5100")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher, int macSizeInBits)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009952 RID: 39250 RVA: 0x002216F0 File Offset: 0x0021F8F0
|
||||
[Token(Token = "0x6009952")]
|
||||
[Address(RVA = "0x20E4F60", Offset = "0x20E3960", VA = "0x1820E4F60")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher, int macSizeInBits, IBlockCipherPadding padding)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009952)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.CbcBlockCipherMac::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings.IBlockCipherPadding)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_40:
|
||||
stloc:ArgumentException(var_3_4A, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("MAC size must be multiple of 8")))
|
||||
}
|
||||
|
||||
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: 0x17001889 RID: 6281
|
||||
// (get) Token: 0x06009953 RID: 39251 RVA: 0x00221748 File Offset: 0x0021F948
|
||||
[Token(Token = "0x17001889")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x6009953")]
|
||||
[Address(RVA = "0x20E51A0", Offset = "0x20E3BA0", VA = "0x1820E51A0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009954 RID: 39252 RVA: 0x00221764 File Offset: 0x0021F964
|
||||
[Token(Token = "0x6009954")]
|
||||
[Address(RVA = "0x20E4D80", Offset = "0x20E3780", VA = "0x1820E4D80", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x06009955 RID: 39253 RVA: 0x002217A8 File Offset: 0x0021F9A8
|
||||
[Token(Token = "0x6009955")]
|
||||
[Address(RVA = "0x3EDF60", Offset = "0x3EC960", VA = "0x1803EDF60", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x06009956 RID: 39254 RVA: 0x002217BC File Offset: 0x0021F9BC
|
||||
[Token(Token = "0x6009956")]
|
||||
[Address(RVA = "0x20E4EB0", Offset = "0x20E38B0", VA = "0x1820E4EB0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
if (num == array.Length)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
}
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
}
|
||||
|
||||
// Token: 0x06009957 RID: 39255 RVA: 0x00221800 File Offset: 0x0021FA00
|
||||
[Token(Token = "0x6009957")]
|
||||
[Address(RVA = "0x20E49B0", Offset = "0x20E33B0", VA = "0x1820E49B0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.bufOff;
|
||||
int num2 = 0;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.buf;
|
||||
this.bufOff = num2;
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
if (num2 < blockCipher2)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
byte[] array2 = this.buf;
|
||||
Array.Copy(input, inOff, array2, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x06009958 RID: 39256 RVA: 0x00221868 File Offset: 0x0021FA68
|
||||
[Token(Token = "0x6009958")]
|
||||
[Address(RVA = "0x20E4BB0", Offset = "0x20E35B0", VA = "0x1820E4BB0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = 0;
|
||||
IBlockCipherPadding blockCipherPadding = this.padding;
|
||||
int i = this.bufOff;
|
||||
if (blockCipherPadding != 0)
|
||||
{
|
||||
if (i == blockCipher)
|
||||
{
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.buf;
|
||||
this.bufOff = num;
|
||||
}
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte[] array2 = this.buf;
|
||||
int num2 = this.macSize;
|
||||
byte[] array3 = this.buf;
|
||||
int num3 = 0;
|
||||
Array.Copy(array3, num3, output, outOff, num2);
|
||||
byte[] array4 = this.buf;
|
||||
int length = array4.Length;
|
||||
int num4 = 0;
|
||||
Array.Clear(array4, num4, length);
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
this.bufOff = num;
|
||||
return this.macSize;
|
||||
}
|
||||
while (i >= blockCipher)
|
||||
{
|
||||
}
|
||||
byte[] array5 = this.buf;
|
||||
int num5 = i + 1;
|
||||
this.bufOff = num5;
|
||||
int num6 = this.bufOff;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009959 RID: 39257 RVA: 0x0022193C File Offset: 0x0021FB3C
|
||||
[Token(Token = "0x6009959")]
|
||||
[Address(RVA = "0x20E4E40", Offset = "0x20E3840", VA = "0x1820E4E40", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040064AD RID: 25773
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064AD")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040064AE RID: 25774
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064AE")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040064AF RID: 25775
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40064AF")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040064B0 RID: 25776
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40064B0")]
|
||||
private IBlockCipherPadding padding;
|
||||
|
||||
// Token: 0x040064B1 RID: 25777
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40064B1")]
|
||||
private int macSize;
|
||||
}
|
||||
}
|
||||
+238
@@ -0,0 +1,238 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x0200166F RID: 5743
|
||||
[Token(Token = "0x200166F")]
|
||||
[StructLayout(3)]
|
||||
public class CfbBlockCipherMac : IMac
|
||||
{
|
||||
// Token: 0x06009962 RID: 39266 RVA: 0x00221B6C File Offset: 0x0021FD6C
|
||||
[Token(Token = "0x6009962")]
|
||||
[Address(RVA = "0x20E7770", Offset = "0x20E6170", VA = "0x1820E7770")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009963 RID: 39267 RVA: 0x00221B84 File Offset: 0x0021FD84
|
||||
[Token(Token = "0x6009963")]
|
||||
[Address(RVA = "0x20E77F0", Offset = "0x20E61F0", VA = "0x1820E77F0")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher, IBlockCipherPadding padding)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009964 RID: 39268 RVA: 0x00221B98 File Offset: 0x0021FD98
|
||||
[Token(Token = "0x6009964")]
|
||||
[Address(RVA = "0x20E7750", Offset = "0x20E6150", VA = "0x1820E7750")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher, int cfbBitSize, int macSizeInBits)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06009965 RID: 39269 RVA: 0x00221BA8 File Offset: 0x0021FDA8
|
||||
[Token(Token = "0x6009965")]
|
||||
[Address(RVA = "0x20E7880", Offset = "0x20E6280", VA = "0x1820E7880")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher, int cfbBitSize, int macSizeInBits, IBlockCipherPadding padding)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009965)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.CfbBlockCipherMac::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32,System.Int32,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings.IBlockCipherPadding)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_93:
|
||||
stloc:ArgumentException(var_8_9D, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("MAC size must be multiple of 8")))
|
||||
}
|
||||
|
||||
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: 0x1700188C RID: 6284
|
||||
// (get) Token: 0x06009966 RID: 39270 RVA: 0x00221C54 File Offset: 0x0021FE54
|
||||
[Token(Token = "0x1700188C")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x6009966")]
|
||||
[Address(RVA = "0x20E7A50", Offset = "0x20E6450", VA = "0x1820E7A50", Slot = "5")]
|
||||
get
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
IBlockCipher blockCipher = macCFBBlockCipher.cipher;
|
||||
int blockSize = macCFBBlockCipher.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009967 RID: 39271 RVA: 0x00221C80 File Offset: 0x0021FE80
|
||||
[Token(Token = "0x6009967")]
|
||||
[Address(RVA = "0x20E75F0", Offset = "0x20E5FF0", VA = "0x1820E75F0", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
this.Reset();
|
||||
this.cipher.Init(true, parameters);
|
||||
}
|
||||
|
||||
// Token: 0x06009968 RID: 39272 RVA: 0x00221CA8 File Offset: 0x0021FEA8
|
||||
[Token(Token = "0x6009968")]
|
||||
[Address(RVA = "0x3D3FF0", Offset = "0x3D29F0", VA = "0x1803D3FF0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x06009969 RID: 39273 RVA: 0x00221CBC File Offset: 0x0021FEBC
|
||||
[Token(Token = "0x6009969")]
|
||||
[Address(RVA = "0x20E76C0", Offset = "0x20E60C0", VA = "0x1820E76C0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] buffer = this.Buffer;
|
||||
int num = this.bufOff;
|
||||
if (num == buffer.Length)
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
int num4 = macCFBBlockCipher.ProcessBlock(buffer, num3, array, num2);
|
||||
}
|
||||
int num5 = num + 1;
|
||||
this.bufOff = num5;
|
||||
}
|
||||
|
||||
// Token: 0x0600996A RID: 39274 RVA: 0x00221D18 File Offset: 0x0021FF18
|
||||
[Token(Token = "0x600996A")]
|
||||
[Address(RVA = "0x20E7280", Offset = "0x20E5C80", VA = "0x1820E7280", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
int num = this.cipher.blockSize;
|
||||
int num2 = 0;
|
||||
int num3 = this.bufOff;
|
||||
num -= num3;
|
||||
if (len > num)
|
||||
{
|
||||
byte[] buffer = this.Buffer;
|
||||
Array.Copy(input, inOff, buffer, num3, num);
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
int num4 = 0;
|
||||
byte[] buffer2 = this.Buffer;
|
||||
int num5 = macCFBBlockCipher.ProcessBlock(buffer2, num4, array, num2);
|
||||
this.bufOff = num2;
|
||||
if (len > num)
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher2 = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
int num6 = macCFBBlockCipher2.ProcessBlock(input, inOff, array2, num2);
|
||||
}
|
||||
}
|
||||
byte[] buffer3 = this.Buffer;
|
||||
Array.Copy(input, inOff, buffer3, num3, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600996B RID: 39275 RVA: 0x00221DC8 File Offset: 0x0021FFC8
|
||||
[Token(Token = "0x600996B")]
|
||||
[Address(RVA = "0x20E73F0", Offset = "0x20E5DF0", VA = "0x1820E73F0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
IBlockCipherPadding blockCipherPadding = this.padding;
|
||||
int blockSize = macCFBBlockCipher.blockSize;
|
||||
int i = this.bufOff;
|
||||
if (blockCipherPadding != 0)
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher2 = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
int num = 0;
|
||||
byte[] buffer = this.Buffer;
|
||||
int num2 = 0;
|
||||
int num3 = macCFBBlockCipher2.ProcessBlock(buffer, num2, array, num);
|
||||
MacCFBBlockCipher macCFBBlockCipher3 = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
IBlockCipher blockCipher = macCFBBlockCipher3.cipher;
|
||||
int num4 = this.macSize;
|
||||
byte[] array3 = this.mac;
|
||||
int num5 = 0;
|
||||
Array.Copy(array3, num5, output, outOff, num4);
|
||||
byte[] buffer2 = this.Buffer;
|
||||
int length = buffer2.Length;
|
||||
int num6 = 0;
|
||||
Array.Clear(buffer2, num6, length);
|
||||
MacCFBBlockCipher macCFBBlockCipher4 = this.cipher;
|
||||
this.bufOff = num;
|
||||
byte[] iv = macCFBBlockCipher4.IV;
|
||||
byte[] cfbV = macCFBBlockCipher4.cfbV;
|
||||
IBlockCipher blockCipher2 = macCFBBlockCipher4.cipher;
|
||||
return this.macSize;
|
||||
}
|
||||
while (i >= blockSize)
|
||||
{
|
||||
}
|
||||
byte[] buffer3 = this.Buffer;
|
||||
int num7 = i + 1;
|
||||
this.bufOff = num7;
|
||||
int num8 = this.bufOff;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600996C RID: 39276 RVA: 0x00221EE0 File Offset: 0x002200E0
|
||||
[Token(Token = "0x600996C")]
|
||||
[Address(RVA = "0x20E7630", Offset = "0x20E6030", VA = "0x1820E7630", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] buffer = this.Buffer;
|
||||
int length = buffer.Length;
|
||||
int num = 0;
|
||||
Array.Clear(buffer, num, length);
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
byte[] iv = macCFBBlockCipher.IV;
|
||||
byte[] cfbV = macCFBBlockCipher.cfbV;
|
||||
IBlockCipher blockCipher = macCFBBlockCipher.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040064B7 RID: 25783
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064B7")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040064B8 RID: 25784
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064B8")]
|
||||
private byte[] Buffer;
|
||||
|
||||
// Token: 0x040064B9 RID: 25785
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40064B9")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040064BA RID: 25786
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40064BA")]
|
||||
private MacCFBBlockCipher cipher;
|
||||
|
||||
// Token: 0x040064BB RID: 25787
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40064BB")]
|
||||
private IBlockCipherPadding padding;
|
||||
|
||||
// Token: 0x040064BC RID: 25788
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40064BC")]
|
||||
private int macSize;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Rfc8032;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001670 RID: 5744
|
||||
[Token(Token = "0x2001670")]
|
||||
[StructLayout(3)]
|
||||
public class Dstu7564Mac : IMac
|
||||
{
|
||||
// Token: 0x1700188D RID: 6285
|
||||
// (get) Token: 0x0600996D RID: 39277 RVA: 0x00221F38 File Offset: 0x00220138
|
||||
[Token(Token = "0x1700188D")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600996D")]
|
||||
[Address(RVA = "0x20E9630", Offset = "0x20E8030", VA = "0x1820E9630", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "DSTU7564Mac";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600996E RID: 39278 RVA: 0x00221F4C File Offset: 0x0022014C
|
||||
[Token(Token = "0x600996E")]
|
||||
[Address(RVA = "0x20E95B0", Offset = "0x20E7FB0", VA = "0x1820E95B0")]
|
||||
public Dstu7564Mac(int macSizeBits)
|
||||
{
|
||||
Dstu7564Digest dstu7564Digest = new Dstu7564Digest(macSizeBits);
|
||||
this.engine = dstu7564Digest;
|
||||
this.macSize = macSizeBits;
|
||||
}
|
||||
|
||||
// Token: 0x0600996F RID: 39279 RVA: 0x00221F74 File Offset: 0x00220174
|
||||
[Token(Token = "0x600996F")]
|
||||
[Address(RVA = "0x20E9000", Offset = "0x20E7A00", VA = "0x1820E9000", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600996F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7564Mac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_74:
|
||||
stloc:ArgumentException(var_11_7E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Bad 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: 0x06009970 RID: 39280 RVA: 0x00222000 File Offset: 0x00220200
|
||||
[Token(Token = "0x6009970")]
|
||||
[Address(RVA = "0x3EE8D0", Offset = "0x3ED2D0", VA = "0x1803EE8D0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x06009971 RID: 39281 RVA: 0x00222014 File Offset: 0x00220214
|
||||
[Token(Token = "0x6009971")]
|
||||
[Address(RVA = "0x20E8CB0", Offset = "0x20E76B0", VA = "0x1820E8CB0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009971)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7564Mac::BlockUpdate(System.Byte[],System.Int32,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_25:
|
||||
stloc:InvalidOperationException(var_1_3A, newobj:InvalidOperationException(InvalidOperationException::.ctor, call:string(string::Concat, callgetter:string(Dstu7564Mac::get_AlgorithmName, ldloc:Dstu7564Mac(this)), ldstr:string(" not initialised"))))
|
||||
}
|
||||
|
||||
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: 0x06009972 RID: 39282 RVA: 0x0022205C File Offset: 0x0022025C
|
||||
[Token(Token = "0x6009972")]
|
||||
[Address(RVA = "0x20E9570", Offset = "0x20E7F70", VA = "0x1820E9570", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
int byteLength = this.engine.GetByteLength();
|
||||
}
|
||||
|
||||
// Token: 0x06009973 RID: 39283 RVA: 0x0022207C File Offset: 0x0022027C
|
||||
[Token(Token = "0x6009973")]
|
||||
[Address(RVA = "0x20E8DB0", Offset = "0x20E77B0", VA = "0x1820E8DB0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009973)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7564Mac::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_C4:
|
||||
stloc:InvalidOperationException(var_11_D9, newobj:InvalidOperationException(InvalidOperationException::.ctor, call:string(string::Concat, callgetter:string(Dstu7564Mac::get_AlgorithmName, ldloc:Dstu7564Mac(this)), ldstr:string(" not initialised"))))
|
||||
}
|
||||
|
||||
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: 0x06009974 RID: 39284 RVA: 0x00222164 File Offset: 0x00220364
|
||||
[Token(Token = "0x6009974")]
|
||||
[Address(RVA = "0x20E9500", Offset = "0x20E7F00", VA = "0x1820E9500", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
this.inputLength = (ulong)0L;
|
||||
Dstu7564Digest dstu7564Digest = this.engine;
|
||||
byte[] array = this.paddedKey;
|
||||
if (array != 0)
|
||||
{
|
||||
this.engine.Update(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009975 RID: 39285 RVA: 0x002221A0 File Offset: 0x002203A0
|
||||
[Token(Token = "0x6009975")]
|
||||
[Address(RVA = "0x20E93D0", Offset = "0x20E7DD0", VA = "0x1820E93D0")]
|
||||
private void Pad()
|
||||
{
|
||||
int num = this.engine.GetDigestSize();
|
||||
int digestSize = this.engine.GetDigestSize();
|
||||
int num2 = 0;
|
||||
num -= num2;
|
||||
if (num < 13)
|
||||
{
|
||||
int digestSize2 = this.engine.GetDigestSize();
|
||||
num += digestSize2;
|
||||
}
|
||||
byte[] array = new byte[num];
|
||||
array[0] = (byte)((ulong)128L);
|
||||
int length = array.Length;
|
||||
Pack.UInt64_To_LE(this.inputLength, array, length);
|
||||
this.engine.Update(array);
|
||||
}
|
||||
|
||||
// Token: 0x06009976 RID: 39286 RVA: 0x00222224 File Offset: 0x00220424
|
||||
[Token(Token = "0x6009976")]
|
||||
[Address(RVA = "0x20E9220", Offset = "0x20E7C20", VA = "0x1820E9220")]
|
||||
private byte[] PadKey(byte[] input)
|
||||
{
|
||||
int num = this.engine.GetDigestSize();
|
||||
int num2 = this.engine.GetDigestSize();
|
||||
int digestSize = this.engine.GetDigestSize();
|
||||
Dstu7564Digest dstu7564Digest = this.engine;
|
||||
int num3 = input.Length;
|
||||
num3 += num;
|
||||
num2 = num3;
|
||||
int num4 = num2 * digestSize;
|
||||
int digestSize2 = dstu7564Digest.GetDigestSize();
|
||||
Dstu7564Digest dstu7564Digest2 = this.engine;
|
||||
num = digestSize2;
|
||||
int digestSize3 = dstu7564Digest2.GetDigestSize();
|
||||
if (num < 13)
|
||||
{
|
||||
int digestSize4 = this.engine.GetDigestSize();
|
||||
num4 += digestSize4;
|
||||
}
|
||||
byte[] array = new byte[num4];
|
||||
int length = input.Length;
|
||||
int num5 = 0;
|
||||
int num6 = 0;
|
||||
Array.Copy(input, num6, array, num5, length);
|
||||
int length2 = input.Length;
|
||||
int length3 = array.Length;
|
||||
Ed25519.Encode32((uint)input.Length, array, length3);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x040064BD RID: 25789
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064BD")]
|
||||
private Dstu7564Digest engine;
|
||||
|
||||
// Token: 0x040064BE RID: 25790
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064BE")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x040064BF RID: 25791
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40064BF")]
|
||||
private ulong inputLength;
|
||||
|
||||
// Token: 0x040064C0 RID: 25792
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40064C0")]
|
||||
private byte[] paddedKey;
|
||||
|
||||
// Token: 0x040064C1 RID: 25793
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40064C1")]
|
||||
private byte[] invertedKey;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,247 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001671 RID: 5745
|
||||
[Token(Token = "0x2001671")]
|
||||
[StructLayout(3)]
|
||||
public class Dstu7624Mac : IMac
|
||||
{
|
||||
// Token: 0x06009977 RID: 39287 RVA: 0x002222F4 File Offset: 0x002204F4
|
||||
[Token(Token = "0x6009977")]
|
||||
[Address(RVA = "0x20E9D80", Offset = "0x20E8780", VA = "0x1820E9D80")]
|
||||
public Dstu7624Mac(int blockSizeBits, int q)
|
||||
{
|
||||
Dstu7624Engine dstu7624Engine = new Dstu7624Engine(blockSizeBits);
|
||||
this.engine = dstu7624Engine;
|
||||
this.blockSize = dstu7624Engine;
|
||||
this.macSize = blockSizeBits;
|
||||
byte[] array = new byte[dstu7624Engine];
|
||||
int num = this.blockSize;
|
||||
this.c = array;
|
||||
byte[] array2 = new byte[num];
|
||||
int num2 = this.blockSize;
|
||||
this.cTemp = array2;
|
||||
byte[] array3 = new byte[num2];
|
||||
int num3 = this.blockSize;
|
||||
this.kDelta = array3;
|
||||
byte[] array4 = new byte[num3];
|
||||
this.buf = array4;
|
||||
}
|
||||
|
||||
// Token: 0x06009978 RID: 39288 RVA: 0x00222378 File Offset: 0x00220578
|
||||
[Token(Token = "0x6009978")]
|
||||
[Address(RVA = "0x20E9980", Offset = "0x20E8380", VA = "0x1820E9980", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009978)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7624Mac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_25:
|
||||
stloc:ArgumentException(var_6_36, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("invalid parameter passed to Dstu7624Mac init - "), ldloc:string(var_5))))
|
||||
}
|
||||
|
||||
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: 0x1700188E RID: 6286
|
||||
// (get) Token: 0x06009979 RID: 39289 RVA: 0x002223BC File Offset: 0x002205BC
|
||||
[Token(Token = "0x1700188E")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x6009979")]
|
||||
[Address(RVA = "0x20E9E60", Offset = "0x20E8860", VA = "0x1820E9E60", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "Dstu7624Mac";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600997A RID: 39290 RVA: 0x002223D0 File Offset: 0x002205D0
|
||||
[Token(Token = "0x600997A")]
|
||||
[Address(RVA = "0x3C1C50", Offset = "0x3C0650", VA = "0x1803C1C50", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600997B RID: 39291 RVA: 0x002223E4 File Offset: 0x002205E4
|
||||
[Token(Token = "0x600997B")]
|
||||
[Address(RVA = "0x20E9BF0", Offset = "0x20E85F0", VA = "0x1820E9BF0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
if (num == array.Length)
|
||||
{
|
||||
byte[] array2 = this.cTemp;
|
||||
int num2 = 0;
|
||||
byte[] array3 = this.c;
|
||||
int num3 = 0;
|
||||
this.Xor(array3, num3, array, num2, array2);
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
}
|
||||
int num4 = num + 1;
|
||||
this.bufOff = num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600997C RID: 39292 RVA: 0x00222448 File Offset: 0x00220648
|
||||
[Token(Token = "0x600997C")]
|
||||
[Address(RVA = "0x20E9660", Offset = "0x20E8060", VA = "0x1820E9660", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
string text = this.engine.AlgorithmName;
|
||||
int num = this.bufOff;
|
||||
int num2 = 0;
|
||||
text -= num;
|
||||
if (len > text)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num3 = 0;
|
||||
this.processBlock(array, num3);
|
||||
this.bufOff = num2;
|
||||
if (len > text)
|
||||
{
|
||||
byte[] array2 = this.cTemp;
|
||||
byte[] array3 = this.c;
|
||||
int num4 = 0;
|
||||
this.Xor(array3, num4, input, inOff, array2);
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
}
|
||||
}
|
||||
byte[] array4 = this.buf;
|
||||
Array.Copy(input, inOff, array4, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600997D RID: 39293 RVA: 0x002224D8 File Offset: 0x002206D8
|
||||
[Token(Token = "0x600997D")]
|
||||
[Address(RVA = "0x20E9E90", Offset = "0x20E8890", VA = "0x1820E9E90")]
|
||||
private void processBlock(byte[] input, int inOff)
|
||||
{
|
||||
byte[] array = this.cTemp;
|
||||
byte[] array2 = this.c;
|
||||
int num = 0;
|
||||
this.Xor(array2, num, input, inOff, array);
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
}
|
||||
|
||||
// Token: 0x0600997E RID: 39294 RVA: 0x00222510 File Offset: 0x00220710
|
||||
[Token(Token = "0x600997E")]
|
||||
[Address(RVA = "0x20E9CB0", Offset = "0x20E86B0", VA = "0x1820E9CB0")]
|
||||
private void Xor(byte[] c, int cOff, byte[] input, int inOff, byte[] xorResult)
|
||||
{
|
||||
if (this.blockSize > 0)
|
||||
{
|
||||
byte b;
|
||||
input[0] = b;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600997F RID: 39295 RVA: 0x00222534 File Offset: 0x00220734
|
||||
[Token(Token = "0x600997F")]
|
||||
[Address(RVA = "0x20E9800", Offset = "0x20E8200", VA = "0x1820E9800", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600997F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7624Mac::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_89:
|
||||
stloc:DataLengthException(var_13_93, newobj:DataLengthException(DataLengthException::.ctor, ldstr:string("Input must be a multiple of blocksize")))
|
||||
}
|
||||
|
||||
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: 0x06009980 RID: 39296 RVA: 0x002225D8 File Offset: 0x002207D8
|
||||
[Token(Token = "0x6009980")]
|
||||
[Address(RVA = "0x20E9B10", Offset = "0x20E8510", VA = "0x1820E9B10", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.c;
|
||||
int num = 0;
|
||||
Arrays.Fill(array, (byte)num);
|
||||
byte[] array2 = this.cTemp;
|
||||
int num2 = 0;
|
||||
Arrays.Fill(array2, (byte)num2);
|
||||
byte[] array3 = this.kDelta;
|
||||
int num3 = 0;
|
||||
Arrays.Fill(array3, (byte)num3);
|
||||
byte[] array4 = this.buf;
|
||||
int num4 = 0;
|
||||
Arrays.Fill(array4, (byte)num4);
|
||||
bool isPartialBlockOkay = this.engine.IsPartialBlockOkay;
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
int num5 = 0;
|
||||
this.bufOff = num5;
|
||||
}
|
||||
|
||||
// Token: 0x040064C2 RID: 25794
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064C2")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x040064C3 RID: 25795
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064C3")]
|
||||
private Dstu7624Engine engine;
|
||||
|
||||
// Token: 0x040064C4 RID: 25796
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40064C4")]
|
||||
private int blockSize;
|
||||
|
||||
// Token: 0x040064C5 RID: 25797
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40064C5")]
|
||||
private byte[] c;
|
||||
|
||||
// Token: 0x040064C6 RID: 25798
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40064C6")]
|
||||
private byte[] cTemp;
|
||||
|
||||
// Token: 0x040064C7 RID: 25799
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40064C7")]
|
||||
private byte[] kDelta;
|
||||
|
||||
// Token: 0x040064C8 RID: 25800
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40064C8")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040064C9 RID: 25801
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40064C9")]
|
||||
private int bufOff;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001672 RID: 5746
|
||||
[Token(Token = "0x2001672")]
|
||||
[StructLayout(3)]
|
||||
public class GMac : IMac
|
||||
{
|
||||
// Token: 0x06009981 RID: 39297 RVA: 0x00222654 File Offset: 0x00220854
|
||||
[Token(Token = "0x6009981")]
|
||||
[Address(RVA = "0x20EB450", Offset = "0x20E9E50", VA = "0x1820EB450")]
|
||||
public GMac(GcmBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
this.macSizeBits = (int)((ulong)128L);
|
||||
}
|
||||
|
||||
// Token: 0x06009982 RID: 39298 RVA: 0x0022267C File Offset: 0x0022087C
|
||||
[Token(Token = "0x6009982")]
|
||||
[Address(RVA = "0x67E170", Offset = "0x67CB70", VA = "0x18067E170")]
|
||||
public GMac(GcmBlockCipher cipher, int macSizeBits)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
this.macSizeBits = macSizeBits;
|
||||
}
|
||||
|
||||
// Token: 0x06009983 RID: 39299 RVA: 0x002226A0 File Offset: 0x002208A0
|
||||
[Token(Token = "0x6009983")]
|
||||
[Address(RVA = "0x20EB1C0", Offset = "0x20E9BC0", VA = "0x1820EB1C0", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009983)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.GMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_21:
|
||||
stloc:ArgumentException(var_6_2B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("GMAC requires ParametersWithIV")))
|
||||
}
|
||||
|
||||
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: 0x1700188F RID: 6287
|
||||
// (get) Token: 0x06009984 RID: 39300 RVA: 0x002226DC File Offset: 0x002208DC
|
||||
[Token(Token = "0x1700188F")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x6009984")]
|
||||
[Address(RVA = "0x20EB480", Offset = "0x20E9E80", VA = "0x1820EB480", Slot = "5")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher.cipher;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009985 RID: 39301 RVA: 0x002226FC File Offset: 0x002208FC
|
||||
[Token(Token = "0x6009985")]
|
||||
[Address(RVA = "0x20EB1B0", Offset = "0x20E9BB0", VA = "0x1820EB1B0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSizeBits;
|
||||
}
|
||||
|
||||
// Token: 0x06009986 RID: 39302 RVA: 0x00222710 File Offset: 0x00220910
|
||||
[Token(Token = "0x6009986")]
|
||||
[Address(RVA = "0x20EB3B0", Offset = "0x20E9DB0", VA = "0x1820EB3B0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
GcmBlockCipher gcmBlockCipher = this.cipher;
|
||||
gcmBlockCipher.CheckStatus();
|
||||
byte[] atBlock = gcmBlockCipher.atBlock;
|
||||
int atBlockPos = gcmBlockCipher.atBlockPos;
|
||||
int num = gcmBlockCipher.atBlockPos;
|
||||
num++;
|
||||
gcmBlockCipher.atBlockPos = num;
|
||||
if (num == 16)
|
||||
{
|
||||
byte[] atBlock2 = gcmBlockCipher.atBlock;
|
||||
byte[] s_at = gcmBlockCipher.S_at;
|
||||
gcmBlockCipher.gHASHBlock(s_at, atBlock2);
|
||||
gcmBlockCipher.atBlockPos = (int)((ulong)0L);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009987 RID: 39303 RVA: 0x00222778 File Offset: 0x00220978
|
||||
[Token(Token = "0x6009987")]
|
||||
[Address(RVA = "0x20EB0B0", Offset = "0x20E9AB0", VA = "0x1820EB0B0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
this.cipher.ProcessAadBytes(input, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x06009988 RID: 39304 RVA: 0x0022279C File Offset: 0x0022099C
|
||||
[Token(Token = "0x6009988")]
|
||||
[Address(RVA = "0x20EB0E0", Offset = "0x20E9AE0", VA = "0x1820EB0E0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
return this.cipher.DoFinal(output, outOff);
|
||||
}
|
||||
|
||||
// Token: 0x06009989 RID: 39305 RVA: 0x002227C4 File Offset: 0x002209C4
|
||||
[Token(Token = "0x6009989")]
|
||||
[Address(RVA = "0x20EB380", Offset = "0x20E9D80", VA = "0x1820EB380", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
this.cipher.Reset(true);
|
||||
}
|
||||
|
||||
// Token: 0x040064CA RID: 25802
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064CA")]
|
||||
private readonly GcmBlockCipher cipher;
|
||||
|
||||
// Token: 0x040064CB RID: 25803
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064CB")]
|
||||
private readonly int macSizeBits;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,424 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001673 RID: 5747
|
||||
[Token(Token = "0x2001673")]
|
||||
[StructLayout(3)]
|
||||
public class Gost28147Mac : IMac
|
||||
{
|
||||
// Token: 0x0600998A RID: 39306 RVA: 0x002227E4 File Offset: 0x002209E4
|
||||
[Token(Token = "0x600998A")]
|
||||
[Address(RVA = "0x20F07B0", Offset = "0x20EF1B0", VA = "0x1820F07B0")]
|
||||
public Gost28147Mac()
|
||||
{
|
||||
byte[] array = new byte[128];
|
||||
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.2BA9E4B370D477F8C7FE286262D7ADC69CAF290E).FieldHandle);
|
||||
this.S = array;
|
||||
base..ctor();
|
||||
byte[] array2 = new byte[8];
|
||||
this.mac = array2;
|
||||
byte[] array3 = new byte[8];
|
||||
this.buf = array3;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
}
|
||||
|
||||
// Token: 0x0600998B RID: 39307 RVA: 0x00222840 File Offset: 0x00220A40
|
||||
[Token(Token = "0x600998B")]
|
||||
[Address(RVA = "0x20F0160", Offset = "0x20EEB60", VA = "0x1820F0160")]
|
||||
private static int[] GenerateWorkingKey(byte[] userKey)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600998B)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Gost28147Mac::GenerateWorkingKey(System.Byte[])
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_33:
|
||||
stloc:ArgumentException(var_3_3D, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Key length invalid. Key needs to be 32 byte - 256 bit!!!")))
|
||||
}
|
||||
|
||||
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: 0x0600998C RID: 39308 RVA: 0x0022288C File Offset: 0x00220A8C
|
||||
[Token(Token = "0x600998C")]
|
||||
[Address(RVA = "0x20F0240", Offset = "0x20EEC40", VA = "0x1820F0240", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
int num2 = 0;
|
||||
this.bufOff = num2;
|
||||
byte[] array2 = new byte[0];
|
||||
this.buf = array2;
|
||||
this.macIV = num2;
|
||||
if (parameters != 0)
|
||||
{
|
||||
if ("{il2cpp array field local7->}" == typeof(ParametersWithSBox).TypeHandle)
|
||||
{
|
||||
}
|
||||
int num3;
|
||||
if (parameters == 0)
|
||||
{
|
||||
if (parameters == 0)
|
||||
{
|
||||
if (parameters != 0 && parameters != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parameters == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
num3 = 0;
|
||||
if (parameters == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (parameters != 0)
|
||||
{
|
||||
while (num3 == 0)
|
||||
{
|
||||
}
|
||||
if (num3 != 0 && num3 != 0)
|
||||
{
|
||||
goto Block_8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
byte[] array4;
|
||||
int[] array3 = Gost28147Mac.GenerateWorkingKey(array4);
|
||||
this.workingKey = array3;
|
||||
byte[] array5 = this.mac;
|
||||
int length2 = array5.Length;
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
byte[] array6;
|
||||
Array.Copy(array6, num5, array5, num4, length2);
|
||||
byte[] array7;
|
||||
this.macIV = array7;
|
||||
return;
|
||||
Block_8:
|
||||
byte[] array9;
|
||||
int[] array8 = Gost28147Mac.GenerateWorkingKey(array9);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x17001890 RID: 6288
|
||||
// (get) Token: 0x0600998D RID: 39309 RVA: 0x00222990 File Offset: 0x00220B90
|
||||
[Token(Token = "0x17001890")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600998D")]
|
||||
[Address(RVA = "0x20F0910", Offset = "0x20EF310", VA = "0x1820F0910", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "Gost28147Mac";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600998E RID: 39310 RVA: 0x002229A4 File Offset: 0x00220BA4
|
||||
[Token(Token = "0x600998E")]
|
||||
[Address(RVA = "0x600D80", Offset = "0x5FF780", VA = "0x180600D80", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
// Token: 0x0600998F RID: 39311 RVA: 0x002229B4 File Offset: 0x00220BB4
|
||||
[Token(Token = "0x600998F")]
|
||||
[Address(RVA = "0x20F0B50", Offset = "0x20EF550", VA = "0x1820F0B50")]
|
||||
private int gost28147_mainStep(int n1, int key)
|
||||
{
|
||||
int length = this.S.Length;
|
||||
byte b;
|
||||
byte b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b2 = b;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009990 RID: 39312 RVA: 0x002229F0 File Offset: 0x00220BF0
|
||||
[Token(Token = "0x6009990")]
|
||||
[Address(RVA = "0x20F0940", Offset = "0x20EF340", VA = "0x1820F0940")]
|
||||
private void gost28147MacFunc(int[] workingKey, byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = workingKey[num2];
|
||||
int num4 = this.gost28147_mainStep(inOff, num3);
|
||||
num2++;
|
||||
num++;
|
||||
}
|
||||
|
||||
// Token: 0x06009991 RID: 39313 RVA: 0x00222A20 File Offset: 0x00220C20
|
||||
[Token(Token = "0x6009991")]
|
||||
[Address(RVA = "0x20F0850", Offset = "0x20EF250", VA = "0x1820F0850")]
|
||||
private static int bytesToint(byte[] input, int inOff)
|
||||
{
|
||||
int length = input.Length;
|
||||
byte b = input[input];
|
||||
byte b2 = input[input];
|
||||
int num = inOff + 1;
|
||||
b += b2;
|
||||
b += b2;
|
||||
byte b3;
|
||||
b += b3;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009992 RID: 39314 RVA: 0x00222A5C File Offset: 0x00220C5C
|
||||
[Token(Token = "0x6009992")]
|
||||
[Address(RVA = "0x20F0D90", Offset = "0x20EF790", VA = "0x1820F0D90")]
|
||||
private static void intTobytes(int num, byte[] output, int outOff)
|
||||
{
|
||||
int num2 = outOff + 1;
|
||||
}
|
||||
|
||||
// Token: 0x06009993 RID: 39315 RVA: 0x00222A74 File Offset: 0x00220C74
|
||||
[Token(Token = "0x6009993")]
|
||||
[Address(RVA = "0x20EFEE0", Offset = "0x20EE8E0", VA = "0x1820EFEE0")]
|
||||
private static byte[] CM5func(byte[] buf, int bufOff, byte[] mac)
|
||||
{
|
||||
int num = buf.Length;
|
||||
num -= bufOff;
|
||||
byte[] array = new byte[num];
|
||||
int length = mac.Length;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(buf, bufOff, array, num3, length);
|
||||
int length2 = mac.Length;
|
||||
if (num2 != length2)
|
||||
{
|
||||
num2++;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x06009994 RID: 39316 RVA: 0x00222AC4 File Offset: 0x00220CC4
|
||||
[Token(Token = "0x6009994")]
|
||||
[Address(RVA = "0x20F0680", Offset = "0x20EF080", VA = "0x1820F0680", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
int length = array.Length;
|
||||
if (num == length)
|
||||
{
|
||||
byte[] array2 = new byte[length];
|
||||
int length2 = this.mac.Length;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
byte[] array3 = this.buf;
|
||||
int num4 = 0;
|
||||
Array.Copy(array3, num4, array2, num3, length2);
|
||||
if ((this.firstStep ? 1 : 0) == num2)
|
||||
{
|
||||
}
|
||||
byte[] array4 = this.macIV;
|
||||
this.firstStep = num2 != 0;
|
||||
byte[] array6;
|
||||
if (array4 != 0)
|
||||
{
|
||||
byte[] array5 = this.buf;
|
||||
int num5 = 0;
|
||||
array6 = Gost28147Mac.CM5func(array5, num5, array4);
|
||||
}
|
||||
byte[] array7 = this.mac;
|
||||
int num6 = 0;
|
||||
int[] array8 = this.workingKey;
|
||||
this.gost28147MacFunc(array8, array6, num6, array7, num2);
|
||||
}
|
||||
int num7 = num + 1;
|
||||
this.bufOff = num7;
|
||||
}
|
||||
|
||||
// Token: 0x06009995 RID: 39317 RVA: 0x00222B90 File Offset: 0x00220D90
|
||||
[Token(Token = "0x6009995")]
|
||||
[Address(RVA = "0x20EFCF0", Offset = "0x20EE6F0", VA = "0x1820EFCF0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
uint num2;
|
||||
num2 -= (uint)num;
|
||||
int num3 = 0;
|
||||
if (len > (int)num2)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
Array.Copy(input, inOff, array, num, (int)num2);
|
||||
byte[] array2 = new byte[this.buf.Length];
|
||||
int length = this.mac.Length;
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
Array.Copy(this.buf, num5, array2, num4, length);
|
||||
if ((this.firstStep ? 1 : 0) == num3)
|
||||
{
|
||||
}
|
||||
byte[] array3 = this.macIV;
|
||||
this.firstStep = num3 != 0;
|
||||
byte[] array5;
|
||||
if (array3 != 0)
|
||||
{
|
||||
byte[] array4 = this.buf;
|
||||
int num6 = 0;
|
||||
array5 = Gost28147Mac.CM5func(array4, num6, array3);
|
||||
}
|
||||
byte[] array6 = this.mac;
|
||||
int num7 = 0;
|
||||
int[] array7 = this.workingKey;
|
||||
this.gost28147MacFunc(array7, array5, num7, array6, num3);
|
||||
this.bufOff = num3;
|
||||
if (len > 8)
|
||||
{
|
||||
byte[] array8 = this.mac;
|
||||
byte[] array9 = Gost28147Mac.CM5func(input, inOff, array8);
|
||||
byte[] array10 = this.mac;
|
||||
int num8 = 0;
|
||||
int[] array11 = this.workingKey;
|
||||
this.gost28147MacFunc(array11, array9, num8, array10, num3);
|
||||
while (len != 8)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
byte[] array12 = this.buf;
|
||||
Array.Copy(input, inOff, array12, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x06009996 RID: 39318 RVA: 0x00222CB4 File Offset: 0x00220EB4
|
||||
[Token(Token = "0x6009996")]
|
||||
[Address(RVA = "0x20EFFD0", Offset = "0x20EE9D0", VA = "0x1820EFFD0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
if (num < 8)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
int num3 = this.bufOff;
|
||||
}
|
||||
byte[] array2 = new byte[this.buf.Length];
|
||||
int length = this.mac.Length;
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
byte[] array3 = this.buf;
|
||||
int num6 = 0;
|
||||
Array.Copy(array3, num6, array2, num5, length);
|
||||
byte[] array6;
|
||||
if ((this.firstStep ? 1 : 0) == num4)
|
||||
{
|
||||
byte[] array4 = this.mac;
|
||||
byte[] array5 = this.buf;
|
||||
int num7 = 0;
|
||||
array6 = Gost28147Mac.CM5func(array5, num7, array4);
|
||||
}
|
||||
this.firstStep = num4 != 0;
|
||||
byte[] array7 = this.mac;
|
||||
int num8 = 0;
|
||||
int[] array8 = this.workingKey;
|
||||
this.gost28147MacFunc(array8, array6, num8, array7, num4);
|
||||
byte[] array9 = this.mac;
|
||||
int num9 = array9.Length;
|
||||
num9 -= array8;
|
||||
ulong num10;
|
||||
Array.Copy(array9, array8, output, outOff, (int)num10);
|
||||
byte[] array10 = this.buf;
|
||||
int length2 = array10.Length;
|
||||
int num11 = 0;
|
||||
Array.Clear(array10, num11, length2);
|
||||
this.bufOff = num4;
|
||||
this.firstStep = true;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009997 RID: 39319 RVA: 0x00222DD4 File Offset: 0x00220FD4
|
||||
[Token(Token = "0x6009997")]
|
||||
[Address(RVA = "0x20F0640", Offset = "0x20EF040", VA = "0x1820F0640", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
this.firstStep = true;
|
||||
}
|
||||
|
||||
// Token: 0x040064CC RID: 25804
|
||||
[Token(Token = "0x40064CC")]
|
||||
private const int blockSize = 8;
|
||||
|
||||
// Token: 0x040064CD RID: 25805
|
||||
[Token(Token = "0x40064CD")]
|
||||
private const int macSize = 4;
|
||||
|
||||
// Token: 0x040064CE RID: 25806
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064CE")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040064CF RID: 25807
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064CF")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040064D0 RID: 25808
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40064D0")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040064D1 RID: 25809
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40064D1")]
|
||||
private bool firstStep = true;
|
||||
|
||||
// Token: 0x040064D2 RID: 25810
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40064D2")]
|
||||
private int[] workingKey;
|
||||
|
||||
// Token: 0x040064D3 RID: 25811
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40064D3")]
|
||||
private byte[] macIV;
|
||||
|
||||
// Token: 0x040064D4 RID: 25812
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40064D4")]
|
||||
private byte[] S;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001674 RID: 5748
|
||||
[Token(Token = "0x2001674")]
|
||||
[StructLayout(3)]
|
||||
public class HMac : IMac
|
||||
{
|
||||
// Token: 0x06009998 RID: 39320 RVA: 0x00222E10 File Offset: 0x00221010
|
||||
[Token(Token = "0x6009998")]
|
||||
[Address(RVA = "0x20F1640", Offset = "0x20F0040", VA = "0x1820F1640")]
|
||||
public HMac(IDigest digest)
|
||||
{
|
||||
this.digest = digest;
|
||||
byte[] array = new byte[0];
|
||||
int num = this.digestSize;
|
||||
this.inputPad = array;
|
||||
byte[] array2 = new byte[num];
|
||||
this.outputBuf = array2;
|
||||
}
|
||||
|
||||
// Token: 0x17001891 RID: 6289
|
||||
// (get) Token: 0x06009999 RID: 39321 RVA: 0x00222E54 File Offset: 0x00221054
|
||||
[Token(Token = "0x17001891")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x6009999")]
|
||||
[Address(RVA = "0x20F16F0", Offset = "0x20F00F0", VA = "0x1820F16F0", Slot = "11")]
|
||||
get
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
return 0 + "/HMAC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600999A RID: 39322 RVA: 0x00222E7C File Offset: 0x0022107C
|
||||
[Token(Token = "0x600999A")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "12")]
|
||||
public virtual IDigest GetUnderlyingDigest()
|
||||
{
|
||||
return this.digest;
|
||||
}
|
||||
|
||||
// Token: 0x0600999B RID: 39323 RVA: 0x00222E90 File Offset: 0x00221090
|
||||
[Token(Token = "0x600999B")]
|
||||
[Address(RVA = "0x20F1100", Offset = "0x20EFB00", VA = "0x1820F1100", Slot = "13")]
|
||||
public virtual void Init(ICipherParameters parameters)
|
||||
{
|
||||
int length2;
|
||||
for (;;)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
int num = 0;
|
||||
if (parameters != 0 && parameters != 0)
|
||||
{
|
||||
byte[] array;
|
||||
int length = array.Length;
|
||||
byte[] array2 = this.inputPad;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(array, num3, array2, num2, length);
|
||||
IDigest digest2 = this.digest;
|
||||
IDigest digest3 = this.digest;
|
||||
int num4 = this.digestSize;
|
||||
int num5 = this.blockLength;
|
||||
byte[] array3 = this.inputPad;
|
||||
num5 -= num4;
|
||||
Array.Clear(array3, num4, num5);
|
||||
int num6 = this.blockLength;
|
||||
int num7 = 0;
|
||||
byte[] array4 = this.outputBuf;
|
||||
int num8 = 0;
|
||||
Array.Copy(this.inputPad, num8, array4, num7, num6);
|
||||
if (this.blockLength > 0)
|
||||
{
|
||||
byte[] array5 = this.inputPad;
|
||||
num++;
|
||||
if (this.blockLength > 0)
|
||||
{
|
||||
byte[] array6 = this.outputBuf;
|
||||
num++;
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
IDigest digest4 = this.digest;
|
||||
if (num == 0 || num == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
int num9 = this.blockLength;
|
||||
this.opadState = num;
|
||||
if (num == 0 || num == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
byte[] array7 = this.inputPad;
|
||||
IDigest digest5 = this.digest;
|
||||
length2 = array7.Length;
|
||||
if (length2 == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
IDigest digest6 = this.digest;
|
||||
if (length2 != 0 && length2 != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.ipadState = length2;
|
||||
}
|
||||
|
||||
// Token: 0x0600999C RID: 39324 RVA: 0x00222FE4 File Offset: 0x002211E4
|
||||
[Token(Token = "0x600999C")]
|
||||
[Address(RVA = "0x3EE8D0", Offset = "0x3ED2D0", VA = "0x1803EE8D0", Slot = "14")]
|
||||
public virtual int GetMacSize()
|
||||
{
|
||||
return this.digestSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600999D RID: 39325 RVA: 0x00222FF8 File Offset: 0x002211F8
|
||||
[Token(Token = "0x600999D")]
|
||||
[Address(RVA = "0x20F1590", Offset = "0x20EFF90", VA = "0x1820F1590", Slot = "15")]
|
||||
public virtual void Update(byte input)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600999E RID: 39326 RVA: 0x00223014 File Offset: 0x00221214
|
||||
[Token(Token = "0x600999E")]
|
||||
[Address(RVA = "0x20F0E30", Offset = "0x20EF830", VA = "0x1820F0E30", Slot = "16")]
|
||||
public virtual void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
}
|
||||
|
||||
// Token: 0x0600999F RID: 39327 RVA: 0x00223030 File Offset: 0x00221230
|
||||
[Token(Token = "0x600999F")]
|
||||
[Address(RVA = "0x20F0EB0", Offset = "0x20EF8B0", VA = "0x1820F0EB0", Slot = "17")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
int num;
|
||||
int num5;
|
||||
for (;;)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
num = this.blockLength;
|
||||
IMemoable memoable = this.opadState;
|
||||
IDigest digest2 = this.digest;
|
||||
if (memoable == 0)
|
||||
{
|
||||
int length = this.outputBuf.Length;
|
||||
}
|
||||
if (num != 0 && num != 0)
|
||||
{
|
||||
IDigest digest3 = this.digest;
|
||||
int num2 = this.blockLength;
|
||||
IDigest digest4 = this.digest;
|
||||
int num3 = this.digestSize;
|
||||
int num4 = this.blockLength;
|
||||
Array.Clear(this.outputBuf, num4, num3);
|
||||
IMemoable memoable2 = this.ipadState;
|
||||
IDigest digest5 = this.digest;
|
||||
if (memoable2 == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (num5 != 0 && num5 != 0)
|
||||
{
|
||||
goto Block_5;
|
||||
}
|
||||
}
|
||||
}
|
||||
num5 = this.inputPad.Length;
|
||||
num5 = num;
|
||||
return num5;
|
||||
Block_5:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060099A0 RID: 39328 RVA: 0x002230E8 File Offset: 0x002212E8
|
||||
[Token(Token = "0x60099A0")]
|
||||
[Address(RVA = "0x20F1510", Offset = "0x20EFF10", VA = "0x1820F1510", Slot = "18")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
byte[] array = this.inputPad;
|
||||
IDigest digest2 = this.digest;
|
||||
int length = array.Length;
|
||||
}
|
||||
|
||||
// Token: 0x060099A1 RID: 39329 RVA: 0x00223118 File Offset: 0x00221318
|
||||
[Token(Token = "0x60099A1")]
|
||||
[Address(RVA = "0x20F15F0", Offset = "0x20EFFF0", VA = "0x1820F15F0")]
|
||||
private static void XorPad(byte[] pad, int len, byte n)
|
||||
{
|
||||
int num = 0;
|
||||
if (len > 0)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040064D5 RID: 25813
|
||||
[Token(Token = "0x40064D5")]
|
||||
private const byte IPAD = 54;
|
||||
|
||||
// Token: 0x040064D6 RID: 25814
|
||||
[Token(Token = "0x40064D6")]
|
||||
private const byte OPAD = 92;
|
||||
|
||||
// Token: 0x040064D7 RID: 25815
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064D7")]
|
||||
private readonly IDigest digest;
|
||||
|
||||
// Token: 0x040064D8 RID: 25816
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064D8")]
|
||||
private readonly int digestSize;
|
||||
|
||||
// Token: 0x040064D9 RID: 25817
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x40064D9")]
|
||||
private readonly int blockLength;
|
||||
|
||||
// Token: 0x040064DA RID: 25818
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40064DA")]
|
||||
private IMemoable ipadState;
|
||||
|
||||
// Token: 0x040064DB RID: 25819
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40064DB")]
|
||||
private IMemoable opadState;
|
||||
|
||||
// Token: 0x040064DC RID: 25820
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40064DC")]
|
||||
private readonly byte[] inputPad;
|
||||
|
||||
// Token: 0x040064DD RID: 25821
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40064DD")]
|
||||
private readonly byte[] outputBuf;
|
||||
}
|
||||
}
|
||||
+247
@@ -0,0 +1,247 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001675 RID: 5749
|
||||
[Token(Token = "0x2001675")]
|
||||
[StructLayout(3)]
|
||||
public class ISO9797Alg3Mac : IMac
|
||||
{
|
||||
// Token: 0x060099A2 RID: 39330 RVA: 0x00223138 File Offset: 0x00221338
|
||||
[Token(Token = "0x60099A2")]
|
||||
[Address(RVA = "0x20F23F0", Offset = "0x20F0DF0", VA = "0x1820F23F0")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060099A3 RID: 39331 RVA: 0x0022314C File Offset: 0x0022134C
|
||||
[Token(Token = "0x60099A3")]
|
||||
[Address(RVA = "0x20F2470", Offset = "0x20F0E70", VA = "0x1820F2470")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, IBlockCipherPadding padding)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060099A4 RID: 39332 RVA: 0x00223160 File Offset: 0x00221360
|
||||
[Token(Token = "0x60099A4")]
|
||||
[Address(RVA = "0x20F2220", Offset = "0x20F0C20", VA = "0x1820F2220")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, int macSizeInBits)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060099A5 RID: 39333 RVA: 0x00223170 File Offset: 0x00221370
|
||||
[Token(Token = "0x60099A5")]
|
||||
[Address(RVA = "0x20F2240", Offset = "0x20F0C40", VA = "0x1820F2240")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, int macSizeInBits, IBlockCipherPadding padding)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099A5)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.ISO9797Alg3Mac::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings.IBlockCipherPadding)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_66:
|
||||
stloc:ArgumentException(var_6_70, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("cipher must be instance of DesEngine")))
|
||||
}
|
||||
|
||||
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: 0x17001892 RID: 6290
|
||||
// (get) Token: 0x060099A6 RID: 39334 RVA: 0x002231F0 File Offset: 0x002213F0
|
||||
[Token(Token = "0x17001892")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x60099A6")]
|
||||
[Address(RVA = "0x20F2500", Offset = "0x20F0F00", VA = "0x1820F2500", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "ISO9797Alg3";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060099A7 RID: 39335 RVA: 0x00223204 File Offset: 0x00221404
|
||||
[Token(Token = "0x60099A7")]
|
||||
[Address(RVA = "0x20F1C00", Offset = "0x20F0600", VA = "0x1820F1C00", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099A7)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.ISO9797Alg3Mac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_110:
|
||||
stloc:ArgumentException(var_27_11A, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Key must be either 112 or 168 bit long")))
|
||||
}
|
||||
|
||||
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: 0x060099A8 RID: 39336 RVA: 0x0022332C File Offset: 0x0022152C
|
||||
[Token(Token = "0x60099A8")]
|
||||
[Address(RVA = "0x3D3FF0", Offset = "0x3D29F0", VA = "0x1803D3FF0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x060099A9 RID: 39337 RVA: 0x00223340 File Offset: 0x00221540
|
||||
[Token(Token = "0x60099A9")]
|
||||
[Address(RVA = "0x20F2170", Offset = "0x20F0B70", VA = "0x1820F2170", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
if (num == array.Length)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
}
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
}
|
||||
|
||||
// Token: 0x060099AA RID: 39338 RVA: 0x0022338C File Offset: 0x0022158C
|
||||
[Token(Token = "0x60099AA")]
|
||||
[Address(RVA = "0x20F1750", Offset = "0x20F0150", VA = "0x1820F1750", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.bufOff;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
int num2 = 0;
|
||||
this.bufOff = num2;
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
if (num2 < blockCipher2)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
array += num2;
|
||||
byte[] array2 = this.buf;
|
||||
Array.Copy(input, inOff, array2, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x060099AB RID: 39339 RVA: 0x0022340C File Offset: 0x0022160C
|
||||
[Token(Token = "0x60099AB")]
|
||||
[Address(RVA = "0x20F1970", Offset = "0x20F0370", VA = "0x1820F1970", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = 0;
|
||||
IBlockCipherPadding blockCipherPadding = this.padding;
|
||||
int i = this.bufOff;
|
||||
if (blockCipherPadding != 0)
|
||||
{
|
||||
if (i == blockCipher)
|
||||
{
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
this.bufOff = num;
|
||||
}
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
DesEngine desEngine = new DesEngine();
|
||||
int[] workingKey = desEngine.GetWorkingKey();
|
||||
int blockSize = desEngine.GetBlockSize();
|
||||
int[] workingKey2 = desEngine.GetWorkingKey();
|
||||
int blockSize2 = desEngine.GetBlockSize();
|
||||
int num2 = this.macSize;
|
||||
byte[] array3 = this.mac;
|
||||
int num3 = 0;
|
||||
Array.Copy(array3, num3, output, outOff, num2);
|
||||
byte[] array4 = this.buf;
|
||||
int length = array4.Length;
|
||||
int num4 = 0;
|
||||
Array.Clear(array4, num4, length);
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
this.bufOff = num;
|
||||
return this.macSize;
|
||||
}
|
||||
while (i >= blockCipher)
|
||||
{
|
||||
}
|
||||
byte[] array5 = this.buf;
|
||||
int num5 = i + 1;
|
||||
this.bufOff = num5;
|
||||
int num6 = this.bufOff;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060099AC RID: 39340 RVA: 0x0022350C File Offset: 0x0022170C
|
||||
[Token(Token = "0x60099AC")]
|
||||
[Address(RVA = "0x20F2100", Offset = "0x20F0B00", VA = "0x1820F2100", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040064DE RID: 25822
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064DE")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040064DF RID: 25823
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064DF")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040064E0 RID: 25824
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40064E0")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040064E1 RID: 25825
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40064E1")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040064E2 RID: 25826
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40064E2")]
|
||||
private IBlockCipherPadding padding;
|
||||
|
||||
// Token: 0x040064E3 RID: 25827
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40064E3")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x040064E4 RID: 25828
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40064E4")]
|
||||
private KeyParameter lastKey2;
|
||||
|
||||
// Token: 0x040064E5 RID: 25829
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40064E5")]
|
||||
private KeyParameter lastKey3;
|
||||
}
|
||||
}
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x0200166E RID: 5742
|
||||
[Token(Token = "0x200166E")]
|
||||
[StructLayout(3)]
|
||||
internal class MacCFBBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600995A RID: 39258 RVA: 0x00221978 File Offset: 0x0021FB78
|
||||
[Token(Token = "0x600995A")]
|
||||
[Address(RVA = "0x20F5760", Offset = "0x20F4160", VA = "0x1820F5760")]
|
||||
public MacCFBBlockCipher(IBlockCipher cipher, int bitBlockSize)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
this.blockSize = bitBlockSize;
|
||||
byte[] array = new byte[bitBlockSize];
|
||||
this.IV = array;
|
||||
byte[] array2 = new byte[array];
|
||||
this.cfbV = array2;
|
||||
byte[] array3 = new byte[array2];
|
||||
this.cfbOutV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600995B RID: 39259 RVA: 0x002219CC File Offset: 0x0021FBCC
|
||||
[Token(Token = "0x600995B")]
|
||||
[Address(RVA = "0x20F5330", Offset = "0x20F3D30", VA = "0x1820F5330", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
while (parameters != 0 && parameters != 0)
|
||||
{
|
||||
if (parameters != 0)
|
||||
{
|
||||
byte[] iv = this.IV;
|
||||
byte[] array;
|
||||
int length = array.Length;
|
||||
int num = iv.Length;
|
||||
num = length;
|
||||
num -= length;
|
||||
int num2 = 0;
|
||||
Array.Copy(array, num2, iv, num, num);
|
||||
break;
|
||||
}
|
||||
}
|
||||
byte[] iv2 = this.IV;
|
||||
byte[] array2 = this.cfbV;
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x1700188A RID: 6282
|
||||
// (get) Token: 0x0600995C RID: 39260 RVA: 0x00221A44 File Offset: 0x0021FC44
|
||||
[Token(Token = "0x1700188A")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600995C")]
|
||||
[Address(RVA = "0x20F5840", Offset = "0x20F4240", VA = "0x1820F5840", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x1700188B RID: 6283
|
||||
// (get) Token: 0x0600995D RID: 39261 RVA: 0x00221A68 File Offset: 0x0021FC68
|
||||
[Token(Token = "0x1700188B")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600995D")]
|
||||
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600995E RID: 39262 RVA: 0x00221A78 File Offset: 0x0021FC78
|
||||
[Token(Token = "0x600995E")]
|
||||
[Address(RVA = "0x4D24F0", Offset = "0x4D0EF0", VA = "0x1804D24F0", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600995F RID: 39263 RVA: 0x00221A8C File Offset: 0x0021FC8C
|
||||
[Token(Token = "0x600995F")]
|
||||
[Address(RVA = "0x20F54D0", Offset = "0x20F3ED0", VA = "0x1820F54D0", Slot = "8")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array = this.cfbOutV;
|
||||
byte[] array2 = this.cfbV;
|
||||
int num = this.blockSize;
|
||||
if (num > 0)
|
||||
{
|
||||
byte[] array3 = this.cfbOutV;
|
||||
int num2 = this.blockSize;
|
||||
}
|
||||
byte[] array4 = this.cfbV;
|
||||
int num3 = array4.Length;
|
||||
int num4 = 0;
|
||||
num3 -= num;
|
||||
Array.Copy(array4, num, array4, num4, num3);
|
||||
byte[] array5 = this.cfbV;
|
||||
int num5 = this.blockSize;
|
||||
int num6 = array5.Length;
|
||||
num6 -= num5;
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x06009960 RID: 39264 RVA: 0x00221B24 File Offset: 0x0021FD24
|
||||
[Token(Token = "0x6009960")]
|
||||
[Address(RVA = "0x20F56F0", Offset = "0x20F40F0", VA = "0x1820F56F0", Slot = "9")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] iv = this.IV;
|
||||
byte[] array = this.cfbV;
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009961 RID: 39265 RVA: 0x00221B50 File Offset: 0x0021FD50
|
||||
[Token(Token = "0x6009961")]
|
||||
[Address(RVA = "0x20F52C0", Offset = "0x20F3CC0", VA = "0x1820F52C0")]
|
||||
public void GetMacBlock(byte[] mac)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x040064B2 RID: 25778
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064B2")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x040064B3 RID: 25779
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064B3")]
|
||||
private byte[] cfbV;
|
||||
|
||||
// Token: 0x040064B4 RID: 25780
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40064B4")]
|
||||
private byte[] cfbOutV;
|
||||
|
||||
// Token: 0x040064B5 RID: 25781
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40064B5")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x040064B6 RID: 25782
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40064B6")]
|
||||
private readonly IBlockCipher cipher;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,460 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001676 RID: 5750
|
||||
[Token(Token = "0x2001676")]
|
||||
[StructLayout(3)]
|
||||
public class Poly1305 : IMac
|
||||
{
|
||||
// Token: 0x060099AD RID: 39341 RVA: 0x00223548 File Offset: 0x00221748
|
||||
[Token(Token = "0x60099AD")]
|
||||
[Address(RVA = "0x20F8510", Offset = "0x20F6F10", VA = "0x1820F8510")]
|
||||
public Poly1305()
|
||||
{
|
||||
byte[] array = new byte[1];
|
||||
this.singleByte = array;
|
||||
byte[] array2 = new byte[16];
|
||||
this.currentBlock = array2;
|
||||
base..ctor();
|
||||
this.cipher = (ulong)0L;
|
||||
}
|
||||
|
||||
// Token: 0x060099AE RID: 39342 RVA: 0x00223584 File Offset: 0x00221784
|
||||
[Token(Token = "0x60099AE")]
|
||||
[Address(RVA = "0x20F8580", Offset = "0x20F6F80", VA = "0x1820F8580")]
|
||||
public Poly1305(IBlockCipher cipher)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099AE)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Poly1305::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_38:
|
||||
stloc:ArgumentException(var_2_42, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Poly1305 requires a 128 bit block cipher.")))
|
||||
}
|
||||
|
||||
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: 0x060099AF RID: 39343 RVA: 0x002235D4 File Offset: 0x002217D4
|
||||
[Token(Token = "0x60099AF")]
|
||||
[Address(RVA = "0x20F7C10", Offset = "0x20F6610", VA = "0x1820F7C10", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099AF)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Poly1305::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_4F:
|
||||
stloc:ArgumentException(var_8_5E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Poly1305 requires an IV when used with a block cipher."), 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.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: 0x060099B0 RID: 39344 RVA: 0x00223640 File Offset: 0x00221840
|
||||
[Token(Token = "0x60099B0")]
|
||||
[Address(RVA = "0x20F8160", Offset = "0x20F6B60", VA = "0x1820F8160")]
|
||||
private void SetKey(byte[] key, byte[] nonce)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099B0)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Poly1305::SetKey(System.Byte[],System.Byte[])
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_B2:
|
||||
stloc:ArgumentException(var_6_BC, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Poly1305 key must be 256 bits.")))
|
||||
}
|
||||
|
||||
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: 0x17001893 RID: 6291
|
||||
// (get) Token: 0x060099B1 RID: 39345 RVA: 0x0022370C File Offset: 0x0022190C
|
||||
[Token(Token = "0x17001893")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x60099B1")]
|
||||
[Address(RVA = "0x20F8650", Offset = "0x20F7050", VA = "0x1820F8650", Slot = "5")]
|
||||
get
|
||||
{
|
||||
if (this.cipher == 0)
|
||||
{
|
||||
return "Poly1305";
|
||||
}
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060099B2 RID: 39346 RVA: 0x0022372C File Offset: 0x0022192C
|
||||
[Token(Token = "0x60099B2")]
|
||||
[Address(RVA = "0x11B1BB0", Offset = "0x11B05B0", VA = "0x1811B1BB0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x060099B3 RID: 39347 RVA: 0x0022373C File Offset: 0x0022193C
|
||||
[Token(Token = "0x60099B3")]
|
||||
[Address(RVA = "0x20F8400", Offset = "0x20F6E00", VA = "0x1820F8400", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
this.singleByte[0] = input;
|
||||
byte[] array = this.singleByte;
|
||||
int num = this.currentBlockOffset;
|
||||
int num2 = 0;
|
||||
if (num == 16)
|
||||
{
|
||||
this.ProcessBlock();
|
||||
this.currentBlockOffset = num2;
|
||||
}
|
||||
uint num3;
|
||||
num3 -= (uint)num2;
|
||||
uint num4;
|
||||
num4 -= (uint)num2;
|
||||
int num5 = Math.Min((int)num4, (int)num3);
|
||||
int num6 = this.currentBlockOffset;
|
||||
byte[] array2 = this.currentBlock;
|
||||
Array.Copy(array, num2, array2, num6, num5);
|
||||
num2 += num5;
|
||||
}
|
||||
|
||||
// Token: 0x060099B4 RID: 39348 RVA: 0x002237B4 File Offset: 0x002219B4
|
||||
[Token(Token = "0x60099B4")]
|
||||
[Address(RVA = "0x20F78A0", Offset = "0x20F62A0", VA = "0x1820F78A0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
int num = 0;
|
||||
if (len > 0)
|
||||
{
|
||||
if (this.currentBlockOffset == 16)
|
||||
{
|
||||
this.ProcessBlock();
|
||||
this.currentBlockOffset = num;
|
||||
}
|
||||
uint num2;
|
||||
num2 -= (uint)num;
|
||||
int num3 = Math.Min(len, (int)num2);
|
||||
int num4 = this.currentBlockOffset;
|
||||
byte[] array = this.currentBlock;
|
||||
Array.Copy(input, 0, array, num4, num3);
|
||||
num += num3;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060099B5 RID: 39349 RVA: 0x00223808 File Offset: 0x00221A08
|
||||
[Token(Token = "0x60099B5")]
|
||||
[Address(RVA = "0x20F7E30", Offset = "0x20F6830", VA = "0x1820F7E30")]
|
||||
private void ProcessBlock()
|
||||
{
|
||||
if (this.currentBlockOffset < 16)
|
||||
{
|
||||
byte[] array = this.currentBlock;
|
||||
int num = this.currentBlockOffset;
|
||||
num++;
|
||||
if (num < 16)
|
||||
{
|
||||
byte[] array2 = this.currentBlock;
|
||||
num++;
|
||||
}
|
||||
}
|
||||
byte[] array3 = this.currentBlock;
|
||||
int num2 = 0;
|
||||
int @int = SerializationHeaderRecord.GetInt32(array3, num2);
|
||||
int int2 = SerializationHeaderRecord.GetInt32(this.currentBlock, 4);
|
||||
int num3 = SerializationHeaderRecord.GetInt32(this.currentBlock, 8);
|
||||
int int3 = SerializationHeaderRecord.GetInt32(this.currentBlock, 12);
|
||||
uint num4 = this.h4;
|
||||
num4 += (uint)int3;
|
||||
if (this.currentBlockOffset == 16)
|
||||
{
|
||||
num4 += (uint)16777216;
|
||||
}
|
||||
uint num5 = this.r0;
|
||||
uint num6 = this.s4;
|
||||
uint num7 = this.s2;
|
||||
uint num8 = this.s1;
|
||||
uint num9 = this.s3;
|
||||
uint num10 = this.r1;
|
||||
uint num11 = num4 * num7;
|
||||
uint num12 = num8 * num4;
|
||||
int num13 = int3 * (int)num7;
|
||||
num3 = int3;
|
||||
num7 = num4;
|
||||
num12 += (uint)num13;
|
||||
num13 = @int;
|
||||
int num14 = num13 * (int)num5;
|
||||
uint num15 = num7 * num9;
|
||||
num12 += (uint)num14;
|
||||
num14 = num3;
|
||||
int num16 = num14 * (int)num9;
|
||||
num12 += (uint)num16;
|
||||
num16 = int2;
|
||||
int num17 = num16 * (int)num6;
|
||||
num12 += (uint)num17;
|
||||
num17 = int3;
|
||||
int num18 = num17 * (int)num9;
|
||||
num11 += (uint)num18;
|
||||
num18 = @int;
|
||||
int num19 = num18 * (int)num10;
|
||||
num11 += (uint)num19;
|
||||
num19 = int2;
|
||||
int num20 = num19 * (int)num5;
|
||||
num11 += (uint)num20;
|
||||
num20 = num3;
|
||||
int num21 = num20 * (int)num6;
|
||||
num11 += (uint)num21;
|
||||
num11 += num12;
|
||||
int num22 = num3 * (int)num6;
|
||||
num15 += (uint)num22;
|
||||
num22 = @int;
|
||||
int num23 = num22 * int3;
|
||||
num15 += (uint)num23;
|
||||
num23 = int2;
|
||||
int num24 = num23 * (int)num10;
|
||||
num15 += (uint)num24;
|
||||
num24 = num3;
|
||||
int num25 = num24 * (int)num5;
|
||||
num15 += (uint)num25;
|
||||
num15 += num11;
|
||||
int num26 = num3 * (int)num5;
|
||||
num11 = num4;
|
||||
uint num27 = num11 * num6;
|
||||
num26 += (int)num27;
|
||||
int num28 = @int * (int)num9;
|
||||
num26 += num28;
|
||||
num28 = int2;
|
||||
int num29 = num28 * int3;
|
||||
num26 += num29;
|
||||
num29 = num3;
|
||||
int num30 = num29 * (int)num10;
|
||||
num26 += num30;
|
||||
num26 += (int)num15;
|
||||
uint num31 = num4 * num5;
|
||||
int num32 = num3 * (int)num10;
|
||||
int num33 = int2 * (int)num9;
|
||||
int num34 = num3 * int3;
|
||||
uint num35 = num15 * (uint)@int;
|
||||
num35 += (uint)num32;
|
||||
num35 += num31;
|
||||
num35 += (uint)num33;
|
||||
num35 += (uint)num34;
|
||||
num35 += (uint)num26;
|
||||
num35 += num12;
|
||||
num35 += num11;
|
||||
}
|
||||
|
||||
// Token: 0x060099B6 RID: 39350 RVA: 0x00223A84 File Offset: 0x00221C84
|
||||
[Token(Token = "0x60099B6")]
|
||||
[Address(RVA = "0x20F7990", Offset = "0x20F6390", VA = "0x1820F7990", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
uint num;
|
||||
Check.DataLength(output, outOff, (int)num, "Output buffer is too short.");
|
||||
if (this.currentBlockOffset > 0)
|
||||
{
|
||||
this.ProcessBlock();
|
||||
}
|
||||
uint num2 = this.h0;
|
||||
num2 += (uint)outOff;
|
||||
num2 += num2;
|
||||
num2 += num2;
|
||||
this.h0 = num2;
|
||||
this.h1 = output;
|
||||
this.h2 = output;
|
||||
num2 += num2;
|
||||
num2 += output;
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x060099B7 RID: 39351 RVA: 0x00223AE0 File Offset: 0x00221CE0
|
||||
[Token(Token = "0x60099B7")]
|
||||
[Address(RVA = "0x20F8150", Offset = "0x20F6B50", VA = "0x1820F8150", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
int num = 0;
|
||||
this.currentBlockOffset = num;
|
||||
this.h3 = (uint)num;
|
||||
this.h1 = (uint)num;
|
||||
}
|
||||
|
||||
// Token: 0x060099B8 RID: 39352 RVA: 0x00223B04 File Offset: 0x00221D04
|
||||
[Token(Token = "0x60099B8")]
|
||||
[Address(RVA = "0x20F86B0", Offset = "0x20F70B0", VA = "0x1820F86B0")]
|
||||
private static ulong mul32x32_64(uint i1, uint i2)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099B8)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.UInt64 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Poly1305::mul32x32_64(System.UInt32,System.UInt32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:uint32(var_0_03, mul:uint32(ldloc:uint32(i1), ldloc:uint32(i1)))
|
||||
}
|
||||
|
||||
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: 0x040064E6 RID: 25830
|
||||
[Token(Token = "0x40064E6")]
|
||||
private const int BlockSize = 16;
|
||||
|
||||
// Token: 0x040064E7 RID: 25831
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064E7")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040064E8 RID: 25832
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064E8")]
|
||||
private readonly byte[] singleByte;
|
||||
|
||||
// Token: 0x040064E9 RID: 25833
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40064E9")]
|
||||
private uint r0;
|
||||
|
||||
// Token: 0x040064EA RID: 25834
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x40064EA")]
|
||||
private uint r1;
|
||||
|
||||
// Token: 0x040064EB RID: 25835
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40064EB")]
|
||||
private uint r2;
|
||||
|
||||
// Token: 0x040064EC RID: 25836
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x40064EC")]
|
||||
private uint r3;
|
||||
|
||||
// Token: 0x040064ED RID: 25837
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40064ED")]
|
||||
private uint r4;
|
||||
|
||||
// Token: 0x040064EE RID: 25838
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x40064EE")]
|
||||
private uint s1;
|
||||
|
||||
// Token: 0x040064EF RID: 25839
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40064EF")]
|
||||
private uint s2;
|
||||
|
||||
// Token: 0x040064F0 RID: 25840
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x3C")]
|
||||
[Token(Token = "0x40064F0")]
|
||||
private uint s3;
|
||||
|
||||
// Token: 0x040064F1 RID: 25841
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40064F1")]
|
||||
private uint s4;
|
||||
|
||||
// Token: 0x040064F2 RID: 25842
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x44")]
|
||||
[Token(Token = "0x40064F2")]
|
||||
private uint k0;
|
||||
|
||||
// Token: 0x040064F3 RID: 25843
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40064F3")]
|
||||
private uint k1;
|
||||
|
||||
// Token: 0x040064F4 RID: 25844
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x4C")]
|
||||
[Token(Token = "0x40064F4")]
|
||||
private uint k2;
|
||||
|
||||
// Token: 0x040064F5 RID: 25845
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40064F5")]
|
||||
private uint k3;
|
||||
|
||||
// Token: 0x040064F6 RID: 25846
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x40064F6")]
|
||||
private byte[] currentBlock;
|
||||
|
||||
// Token: 0x040064F7 RID: 25847
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x40064F7")]
|
||||
private int currentBlockOffset;
|
||||
|
||||
// Token: 0x040064F8 RID: 25848
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x64")]
|
||||
[Token(Token = "0x40064F8")]
|
||||
private uint h0;
|
||||
|
||||
// Token: 0x040064F9 RID: 25849
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x40064F9")]
|
||||
private uint h1;
|
||||
|
||||
// Token: 0x040064FA RID: 25850
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x6C")]
|
||||
[Token(Token = "0x40064FA")]
|
||||
private uint h2;
|
||||
|
||||
// Token: 0x040064FB RID: 25851
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x40064FB")]
|
||||
private uint h3;
|
||||
|
||||
// Token: 0x040064FC RID: 25852
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x74")]
|
||||
[Token(Token = "0x40064FC")]
|
||||
private uint h4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,302 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001677 RID: 5751
|
||||
[Token(Token = "0x2001677")]
|
||||
[StructLayout(3)]
|
||||
public class SipHash : IMac
|
||||
{
|
||||
// Token: 0x060099B9 RID: 39353 RVA: 0x00223B14 File Offset: 0x00221D14
|
||||
[Token(Token = "0x60099B9")]
|
||||
[Address(RVA = "0x2094800", Offset = "0x2093200", VA = "0x182094800")]
|
||||
public SipHash()
|
||||
{
|
||||
this.c = (int)((ulong)2L);
|
||||
this.d = (int)((ulong)4L);
|
||||
}
|
||||
|
||||
// Token: 0x060099BA RID: 39354 RVA: 0x00223B3C File Offset: 0x00221D3C
|
||||
[Token(Token = "0x60099BA")]
|
||||
[Address(RVA = "0x823C30", Offset = "0x822630", VA = "0x180823C30")]
|
||||
public SipHash(int c, int d)
|
||||
{
|
||||
this.c = c;
|
||||
this.d = d;
|
||||
}
|
||||
|
||||
// Token: 0x17001894 RID: 6292
|
||||
// (get) Token: 0x060099BB RID: 39355 RVA: 0x00223B60 File Offset: 0x00221D60
|
||||
[Token(Token = "0x17001894")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x60099BB")]
|
||||
[Address(RVA = "0x20F8CF0", Offset = "0x20F76F0", VA = "0x1820F8CF0", Slot = "11")]
|
||||
get
|
||||
{
|
||||
object[] array = new object[4];
|
||||
if ("SipHash-" != 0)
|
||||
{
|
||||
}
|
||||
array[0] = "SipHash-";
|
||||
int num = this.c;
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
array[1] = num;
|
||||
if ("-" != 0)
|
||||
{
|
||||
}
|
||||
array[2] = "-";
|
||||
int num2 = this.d;
|
||||
num = num2;
|
||||
if (num2 != 0)
|
||||
{
|
||||
}
|
||||
array[3] = num;
|
||||
return string.Concat(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060099BC RID: 39356 RVA: 0x00223BD0 File Offset: 0x00221DD0
|
||||
[Token(Token = "0x60099BC")]
|
||||
[Address(RVA = "0x56E570", Offset = "0x56CF70", VA = "0x18056E570", Slot = "12")]
|
||||
public virtual int GetMacSize()
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
// Token: 0x060099BD RID: 39357 RVA: 0x00223BE0 File Offset: 0x00221DE0
|
||||
[Token(Token = "0x60099BD")]
|
||||
[Address(RVA = "0x20F8A90", Offset = "0x20F7490", VA = "0x1820F8A90", Slot = "13")]
|
||||
public virtual void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099BD)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.SipHash::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_50:
|
||||
stloc:ArgumentException(var_7_5F, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("must be a 128-bit key"), 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.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: 0x060099BE RID: 39358 RVA: 0x00223C50 File Offset: 0x00221E50
|
||||
[Token(Token = "0x60099BE")]
|
||||
[Address(RVA = "0x20F8CA0", Offset = "0x20F76A0", VA = "0x1820F8CA0", Slot = "14")]
|
||||
public virtual void Update(byte input)
|
||||
{
|
||||
int num = this.wordPos;
|
||||
num++;
|
||||
this.m = (long)input;
|
||||
this.wordPos = num;
|
||||
if (num == 8)
|
||||
{
|
||||
this.Reset();
|
||||
this.wordPos = (int)((ulong)0L);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060099BF RID: 39359 RVA: 0x00223C8C File Offset: 0x00221E8C
|
||||
[Token(Token = "0x60099BF")]
|
||||
[Address(RVA = "0x20F8790", Offset = "0x20F7190", VA = "0x1820F8790", Slot = "15")]
|
||||
public virtual void BlockUpdate(byte[] input, int offset, int length)
|
||||
{
|
||||
int num = this.wordPos;
|
||||
int num2 = 0;
|
||||
if (num != 0)
|
||||
{
|
||||
if (length > 0)
|
||||
{
|
||||
ulong num3 = Pack.LE_To_UInt64(input, 0);
|
||||
long num4 = this.m;
|
||||
this.m = num4;
|
||||
this.Reset();
|
||||
num2 += 8;
|
||||
this.m = (long)num3;
|
||||
}
|
||||
if (num2 >= length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int num5 = this.wordPos;
|
||||
num5++;
|
||||
byte b;
|
||||
this.m = (long)b;
|
||||
this.wordPos = num5;
|
||||
if (num5 == 8)
|
||||
{
|
||||
this.Reset();
|
||||
this.wordPos = num2;
|
||||
}
|
||||
}
|
||||
if (length > 0)
|
||||
{
|
||||
ulong num6 = Pack.LE_To_UInt64(input, 0);
|
||||
this.m = (long)num6;
|
||||
this.Reset();
|
||||
num2 += 8;
|
||||
}
|
||||
if (num2 < length)
|
||||
{
|
||||
byte b2;
|
||||
this.m = (long)b2;
|
||||
}
|
||||
this.wordPos = length;
|
||||
}
|
||||
|
||||
// Token: 0x060099C0 RID: 39360 RVA: 0x00223D40 File Offset: 0x00221F40
|
||||
[Token(Token = "0x60099C0")]
|
||||
[Address(RVA = "0x20F89C0", Offset = "0x20F73C0", VA = "0x1820F89C0", Slot = "16")]
|
||||
public virtual long DoFinal()
|
||||
{
|
||||
int num = this.wordPos;
|
||||
uint num2;
|
||||
num2 -= (uint)num;
|
||||
long num3 = this.m;
|
||||
this.m = num3;
|
||||
this.Reset();
|
||||
this.ProcessMessageWord();
|
||||
return this.v3;
|
||||
}
|
||||
|
||||
// Token: 0x060099C1 RID: 39361 RVA: 0x00223D78 File Offset: 0x00221F78
|
||||
[Token(Token = "0x60099C1")]
|
||||
[Address(RVA = "0x20F8970", Offset = "0x20F7370", VA = "0x1820F8970", Slot = "17")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
// Token: 0x060099C2 RID: 39362 RVA: 0x00223D88 File Offset: 0x00221F88
|
||||
[Token(Token = "0x60099C2")]
|
||||
[Address(RVA = "0x20F8C20", Offset = "0x20F7620", VA = "0x1820F8C20", Slot = "18")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
long num = this.k0;
|
||||
long num2 = this.k1;
|
||||
this.v0 = num;
|
||||
num = num2;
|
||||
this.v1 = num;
|
||||
this.v2 = num;
|
||||
int num3 = 0;
|
||||
this.v3 = num2;
|
||||
this.m = (long)num3;
|
||||
this.wordPos = num3;
|
||||
}
|
||||
|
||||
// Token: 0x060099C3 RID: 39363 RVA: 0x00223DD4 File Offset: 0x00221FD4
|
||||
[Token(Token = "0x60099C3")]
|
||||
[Address(RVA = "0x20F8BE0", Offset = "0x20F75E0", VA = "0x1820F8BE0", Slot = "19")]
|
||||
protected virtual void ProcessMessageWord()
|
||||
{
|
||||
this.ProcessMessageWord();
|
||||
long num = this.m;
|
||||
}
|
||||
|
||||
// Token: 0x060099C4 RID: 39364 RVA: 0x00223DF0 File Offset: 0x00221FF0
|
||||
[Token(Token = "0x60099C4")]
|
||||
[Address(RVA = "0x20F86C0", Offset = "0x20F70C0", VA = "0x1820F86C0", Slot = "20")]
|
||||
protected virtual void ApplySipRounds(int n)
|
||||
{
|
||||
long num = this.v0;
|
||||
long num2 = this.v1;
|
||||
long num3 = this.v2;
|
||||
long num4 = this.v3;
|
||||
if (n > 0)
|
||||
{
|
||||
num += num2;
|
||||
num3 += num4;
|
||||
num3 += num2;
|
||||
num = num3;
|
||||
num += num4;
|
||||
num = num3;
|
||||
num3 = num;
|
||||
while (n != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
this.v0 = num;
|
||||
this.v1 = num2;
|
||||
this.v2 = num3;
|
||||
this.v3 = num4;
|
||||
}
|
||||
|
||||
// Token: 0x060099C5 RID: 39365 RVA: 0x00223E54 File Offset: 0x00222054
|
||||
[Token(Token = "0x60099C5")]
|
||||
[Address(RVA = "0x20F8C80", Offset = "0x20F7680", VA = "0x1820F8C80")]
|
||||
protected static long RotateLeft(long x, int n)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x040064FD RID: 25853
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40064FD")]
|
||||
protected readonly int c;
|
||||
|
||||
// Token: 0x040064FE RID: 25854
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x14")]
|
||||
[Token(Token = "0x40064FE")]
|
||||
protected readonly int d;
|
||||
|
||||
// Token: 0x040064FF RID: 25855
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40064FF")]
|
||||
protected long k0;
|
||||
|
||||
// Token: 0x04006500 RID: 25856
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006500")]
|
||||
protected long k1;
|
||||
|
||||
// Token: 0x04006501 RID: 25857
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006501")]
|
||||
protected long v0;
|
||||
|
||||
// Token: 0x04006502 RID: 25858
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4006502")]
|
||||
protected long v1;
|
||||
|
||||
// Token: 0x04006503 RID: 25859
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4006503")]
|
||||
protected long v2;
|
||||
|
||||
// Token: 0x04006504 RID: 25860
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4006504")]
|
||||
protected long v3;
|
||||
|
||||
// Token: 0x04006505 RID: 25861
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4006505")]
|
||||
protected long m;
|
||||
|
||||
// Token: 0x04006506 RID: 25862
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4006506")]
|
||||
protected int wordPos;
|
||||
|
||||
// Token: 0x04006507 RID: 25863
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x54")]
|
||||
[Token(Token = "0x4006507")]
|
||||
protected int wordCount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001678 RID: 5752
|
||||
[Token(Token = "0x2001678")]
|
||||
[StructLayout(3)]
|
||||
public class SkeinMac : IMac
|
||||
{
|
||||
// Token: 0x060099C6 RID: 39366 RVA: 0x00223E64 File Offset: 0x00222064
|
||||
[Token(Token = "0x60099C6")]
|
||||
[Address(RVA = "0x20F92B0", Offset = "0x20F7CB0", VA = "0x1820F92B0")]
|
||||
public SkeinMac(int stateSizeBits, int digestSizeBits)
|
||||
{
|
||||
SkeinEngine skeinEngine = new SkeinEngine(stateSizeBits, digestSizeBits);
|
||||
this.engine = skeinEngine;
|
||||
}
|
||||
|
||||
// Token: 0x060099C7 RID: 39367 RVA: 0x00223E88 File Offset: 0x00222088
|
||||
[Token(Token = "0x60099C7")]
|
||||
[Address(RVA = "0x20F9230", Offset = "0x20F7C30", VA = "0x1820F9230")]
|
||||
public SkeinMac(SkeinMac mac)
|
||||
{
|
||||
SkeinEngine skeinEngine = new SkeinEngine(mac.engine);
|
||||
this.engine = skeinEngine;
|
||||
}
|
||||
|
||||
// Token: 0x17001895 RID: 6293
|
||||
// (get) Token: 0x060099C8 RID: 39368 RVA: 0x00223EB4 File Offset: 0x002220B4
|
||||
[Token(Token = "0x17001895")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x60099C8")]
|
||||
[Address(RVA = "0x20F9330", Offset = "0x20F7D30", VA = "0x1820F9330", Slot = "5")]
|
||||
get
|
||||
{
|
||||
object[] array = new object[4];
|
||||
if ("Skein-MAC-" != 0)
|
||||
{
|
||||
}
|
||||
array[0] = "Skein-MAC-";
|
||||
int blockSize = this.engine.BlockSize;
|
||||
if (blockSize != 0)
|
||||
{
|
||||
}
|
||||
array[1] = blockSize;
|
||||
if ("-" != 0)
|
||||
{
|
||||
}
|
||||
array[2] = "-";
|
||||
int outputSizeBytes = this.engine.outputSizeBytes;
|
||||
if (outputSizeBytes != 0)
|
||||
{
|
||||
}
|
||||
array[3] = outputSizeBytes;
|
||||
return string.Concat(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060099C9 RID: 39369 RVA: 0x00223F2C File Offset: 0x0022212C
|
||||
[Token(Token = "0x60099C9")]
|
||||
[Address(RVA = "0x20F8F30", Offset = "0x20F7930", VA = "0x1820F8F30", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099C9)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.SkeinMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_64:
|
||||
stloc:ArgumentException(var_15_6E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Skein MAC requires a key parameter.")))
|
||||
}
|
||||
|
||||
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: 0x060099CA RID: 39370 RVA: 0x00223FA8 File Offset: 0x002221A8
|
||||
[Token(Token = "0x60099CA")]
|
||||
[Address(RVA = "0x5FE710", Offset = "0x5FD110", VA = "0x1805FE710", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.engine.outputSizeBytes;
|
||||
}
|
||||
|
||||
// Token: 0x060099CB RID: 39371 RVA: 0x00223FC8 File Offset: 0x002221C8
|
||||
[Token(Token = "0x60099CB")]
|
||||
[Address(RVA = "0x20F91F0", Offset = "0x20F7BF0", VA = "0x1820F91F0", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
this.engine.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x060099CC RID: 39372 RVA: 0x00223FE8 File Offset: 0x002221E8
|
||||
[Token(Token = "0x60099CC")]
|
||||
[Address(RVA = "0x20F9210", Offset = "0x20F7C10", VA = "0x1820F9210", Slot = "7")]
|
||||
public void Update(byte inByte)
|
||||
{
|
||||
this.engine.Update(inByte);
|
||||
}
|
||||
|
||||
// Token: 0x060099CD RID: 39373 RVA: 0x00224008 File Offset: 0x00222208
|
||||
[Token(Token = "0x60099CD")]
|
||||
[Address(RVA = "0x20F8EE0", Offset = "0x20F78E0", VA = "0x1820F8EE0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
this.engine.Update(input, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x060099CE RID: 39374 RVA: 0x0022402C File Offset: 0x0022222C
|
||||
[Token(Token = "0x60099CE")]
|
||||
[Address(RVA = "0x20F8F10", Offset = "0x20F7910", VA = "0x1820F8F10", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
return this.engine.DoFinal(output, outOff);
|
||||
}
|
||||
|
||||
// Token: 0x04006508 RID: 25864
|
||||
[Token(Token = "0x4006508")]
|
||||
public const int SKEIN_256 = 256;
|
||||
|
||||
// Token: 0x04006509 RID: 25865
|
||||
[Token(Token = "0x4006509")]
|
||||
public const int SKEIN_512 = 512;
|
||||
|
||||
// Token: 0x0400650A RID: 25866
|
||||
[Token(Token = "0x400650A")]
|
||||
public const int SKEIN_1024 = 1024;
|
||||
|
||||
// Token: 0x0400650B RID: 25867
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400650B")]
|
||||
private readonly SkeinEngine engine;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,339 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001679 RID: 5753
|
||||
[Token(Token = "0x2001679")]
|
||||
[StructLayout(3)]
|
||||
public class VmpcMac : IMac
|
||||
{
|
||||
// Token: 0x060099CF RID: 39375 RVA: 0x0022404C File Offset: 0x0022224C
|
||||
[Token(Token = "0x60099CF")]
|
||||
[Address(RVA = "0x20FB490", Offset = "0x20F9E90", VA = "0x1820FB490", Slot = "11")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
byte[] p = this.P;
|
||||
byte b = this.n;
|
||||
int length = p.Length;
|
||||
byte b2 = this.s;
|
||||
byte b3;
|
||||
b3 += b2;
|
||||
byte b4;
|
||||
this.s = b4;
|
||||
byte b5 = this.x3;
|
||||
byte b6 = this.x4;
|
||||
b6 += b5;
|
||||
uint num;
|
||||
b6 = (byte)((uint)b6 + num);
|
||||
b3 = b6;
|
||||
byte b7;
|
||||
this.x4 = b7;
|
||||
b7 = (byte)((uint)b7 + num);
|
||||
b3 = b7;
|
||||
byte b8;
|
||||
this.x3 = b8;
|
||||
byte b9 = this.x1;
|
||||
b8 = (byte)((uint)b8 + num);
|
||||
b3 = b8;
|
||||
byte b10;
|
||||
this.x2 = b10;
|
||||
b10 = b4;
|
||||
b10 += b9;
|
||||
b10 = (byte)((uint)b10 + num);
|
||||
b3 = b10;
|
||||
byte[] t = this.T;
|
||||
byte b11;
|
||||
this.x1 = b11;
|
||||
byte b12 = this.g;
|
||||
byte[] t2 = this.T;
|
||||
byte b13 = this.g;
|
||||
byte[] t3 = this.T;
|
||||
byte b14 = this.g;
|
||||
byte[] t4 = this.T;
|
||||
byte b15 = this.g;
|
||||
byte b16 = this.g;
|
||||
byte[] p2 = this.P;
|
||||
this.g = b16;
|
||||
byte b17 = this.n;
|
||||
int length2 = p2.Length;
|
||||
byte b18 = this.s;
|
||||
byte[] p3 = this.P;
|
||||
byte b19 = this.s;
|
||||
num += (uint)1;
|
||||
int num2 = 0;
|
||||
byte[] p4 = this.P;
|
||||
int length3 = p4.Length;
|
||||
byte[] t5 = this.T;
|
||||
byte b20;
|
||||
byte b21;
|
||||
b20 += b21;
|
||||
byte b22 = this.s;
|
||||
b20 += b22;
|
||||
byte b23;
|
||||
this.s = b23;
|
||||
int length4 = p4.Length;
|
||||
byte[] p5 = this.P;
|
||||
byte b24 = this.s;
|
||||
num2++;
|
||||
byte[] array = new byte[20];
|
||||
int num3 = 0;
|
||||
byte[] p6 = this.P;
|
||||
int length5 = p6.Length;
|
||||
byte b25 = this.s;
|
||||
byte b26;
|
||||
b26 += b25;
|
||||
byte b27;
|
||||
this.s = b27;
|
||||
int length6 = p6.Length;
|
||||
int length7 = this.P.Length;
|
||||
byte b28 = this.s;
|
||||
byte[] p7 = this.P;
|
||||
byte b29 = this.s;
|
||||
num3++;
|
||||
int length8 = array.Length;
|
||||
int num4 = 0;
|
||||
Array.Copy(array, num4, output, outOff, length8);
|
||||
return array.Length;
|
||||
}
|
||||
|
||||
// Token: 0x17001896 RID: 6294
|
||||
// (get) Token: 0x060099D0 RID: 39376 RVA: 0x00224270 File Offset: 0x00222470
|
||||
[Token(Token = "0x17001896")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x60099D0")]
|
||||
[Address(RVA = "0x20FC1F0", Offset = "0x20FABF0", VA = "0x1820FC1F0", Slot = "12")]
|
||||
get
|
||||
{
|
||||
return "VMPC-MAC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060099D1 RID: 39377 RVA: 0x00224284 File Offset: 0x00222484
|
||||
[Token(Token = "0x60099D1")]
|
||||
[Address(RVA = "0x15A18C0", Offset = "0x15A02C0", VA = "0x1815A18C0", Slot = "13")]
|
||||
public virtual int GetMacSize()
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
// Token: 0x060099D2 RID: 39378 RVA: 0x00224294 File Offset: 0x00222494
|
||||
[Token(Token = "0x60099D2")]
|
||||
[Address(RVA = "0x20FBB50", Offset = "0x20FA550", VA = "0x1820FBB50", Slot = "14")]
|
||||
public virtual void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099D2)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.VmpcMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_51:
|
||||
stloc:ArgumentException(var_8_60, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("VMPC-MAC requires 1 to 768 bytes of IV"), 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.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: 0x060099D3 RID: 39379 RVA: 0x00224304 File Offset: 0x00222504
|
||||
[Token(Token = "0x60099D3")]
|
||||
[Address(RVA = "0x20FC220", Offset = "0x20FAC20", VA = "0x1820FC220")]
|
||||
private void initKey(byte[] keyBytes, byte[] ivBytes)
|
||||
{
|
||||
this.s = (byte)((ulong)0L);
|
||||
byte[] array = new byte[256];
|
||||
int num = 0;
|
||||
this.P = array;
|
||||
byte[] p = this.P;
|
||||
num++;
|
||||
byte[] p2 = this.P;
|
||||
int length = p2.Length;
|
||||
byte b = p[keyBytes];
|
||||
byte b2;
|
||||
b += b2;
|
||||
byte b3 = this.s;
|
||||
b += b3;
|
||||
byte b4;
|
||||
this.s = b4;
|
||||
int length2 = p2.Length;
|
||||
byte[] p3 = this.P;
|
||||
byte b5 = this.s;
|
||||
num++;
|
||||
byte[] p4 = this.P;
|
||||
int length3 = p4.Length;
|
||||
int length4 = ivBytes.Length;
|
||||
byte b6;
|
||||
byte b7;
|
||||
b6 += b7;
|
||||
byte b8 = this.s;
|
||||
b6 += b8;
|
||||
byte b9;
|
||||
this.s = b9;
|
||||
int length5 = p4.Length;
|
||||
byte[] p5 = this.P;
|
||||
byte b10 = this.s;
|
||||
num++;
|
||||
this.n = (byte)((ulong)0L);
|
||||
}
|
||||
|
||||
// Token: 0x060099D4 RID: 39380 RVA: 0x002243FC File Offset: 0x002225FC
|
||||
[Token(Token = "0x60099D4")]
|
||||
[Address(RVA = "0x20FBDB0", Offset = "0x20FA7B0", VA = "0x1820FBDB0", Slot = "15")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
byte[] array = this.workingIV;
|
||||
byte[] array2 = this.workingKey;
|
||||
this.initKey(array2, array);
|
||||
this.g = (byte)((ulong)0L);
|
||||
this.x1 = (byte)((ulong)0L);
|
||||
byte[] array3 = new byte[32];
|
||||
this.T = array3;
|
||||
int num = 0;
|
||||
byte[] t = this.T;
|
||||
num++;
|
||||
}
|
||||
|
||||
// Token: 0x060099D5 RID: 39381 RVA: 0x00224454 File Offset: 0x00222654
|
||||
[Token(Token = "0x60099D5")]
|
||||
[Address(RVA = "0x20FBE50", Offset = "0x20FA850", VA = "0x1820FBE50", Slot = "16")]
|
||||
public virtual void Update(byte input)
|
||||
{
|
||||
byte[] p = this.P;
|
||||
byte b = this.n;
|
||||
int length = p.Length;
|
||||
byte b2 = this.s;
|
||||
byte b3;
|
||||
b3 += b2;
|
||||
byte b4;
|
||||
this.s = b4;
|
||||
int length2 = p.Length;
|
||||
byte b5 = this.x3;
|
||||
byte b6 = this.x4;
|
||||
b6 += b5;
|
||||
byte b7;
|
||||
this.x4 = b7;
|
||||
byte b8;
|
||||
this.x3 = b8;
|
||||
b7 = b8;
|
||||
byte b9;
|
||||
this.x2 = b9;
|
||||
byte b10 = this.s;
|
||||
b10 += b9;
|
||||
b9 = b10;
|
||||
byte[] t = this.T;
|
||||
byte b11;
|
||||
this.x1 = b11;
|
||||
byte b12 = this.g;
|
||||
byte[] t2 = this.T;
|
||||
byte b13 = this.g;
|
||||
byte b14 = this.x2;
|
||||
byte[] t3 = this.T;
|
||||
byte b15 = this.g;
|
||||
byte b16 = this.x3;
|
||||
byte[] t4 = this.T;
|
||||
byte b17 = this.g;
|
||||
byte b18 = this.g;
|
||||
this.g = b18;
|
||||
byte[] p2 = this.P;
|
||||
byte b19 = this.n;
|
||||
int length3 = p2.Length;
|
||||
byte b20 = this.s;
|
||||
byte b21;
|
||||
p2[0] = b21;
|
||||
byte[] p3 = this.P;
|
||||
byte b22 = this.s;
|
||||
}
|
||||
|
||||
// Token: 0x060099D6 RID: 39382 RVA: 0x0022458C File Offset: 0x0022278C
|
||||
[Token(Token = "0x60099D6")]
|
||||
[Address(RVA = "0x20FB3A0", Offset = "0x20F9DA0", VA = "0x1820FB3A0", Slot = "17")]
|
||||
public virtual void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
if (len > 0)
|
||||
{
|
||||
this.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x060099D7 RID: 39383 RVA: 0x002245AC File Offset: 0x002227AC
|
||||
[Token(Token = "0x60099D7")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public VmpcMac()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400650C RID: 25868
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400650C")]
|
||||
private byte g;
|
||||
|
||||
// Token: 0x0400650D RID: 25869
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x11")]
|
||||
[Token(Token = "0x400650D")]
|
||||
private byte n;
|
||||
|
||||
// Token: 0x0400650E RID: 25870
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400650E")]
|
||||
private byte[] P;
|
||||
|
||||
// Token: 0x0400650F RID: 25871
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400650F")]
|
||||
private byte s;
|
||||
|
||||
// Token: 0x04006510 RID: 25872
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4006510")]
|
||||
private byte[] T;
|
||||
|
||||
// Token: 0x04006511 RID: 25873
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4006511")]
|
||||
private byte[] workingIV;
|
||||
|
||||
// Token: 0x04006512 RID: 25874
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4006512")]
|
||||
private byte[] workingKey;
|
||||
|
||||
// Token: 0x04006513 RID: 25875
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4006513")]
|
||||
private byte x1;
|
||||
|
||||
// Token: 0x04006514 RID: 25876
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x41")]
|
||||
[Token(Token = "0x4006514")]
|
||||
private byte x2;
|
||||
|
||||
// Token: 0x04006515 RID: 25877
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x42")]
|
||||
[Token(Token = "0x4006515")]
|
||||
private byte x3;
|
||||
|
||||
// Token: 0x04006516 RID: 25878
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x43")]
|
||||
[Token(Token = "0x4006516")]
|
||||
private byte x4;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user