580 lines
31 KiB
C#
580 lines
31 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
|
|
{
|
|
// Token: 0x0200170B RID: 5899
|
|
[Token(Token = "0x200170B")]
|
|
[StructLayout(3)]
|
|
public class KeccakDigest : IDigest, IMemoable
|
|
{
|
|
// Token: 0x06009EA8 RID: 40616 RVA: 0x00249078 File Offset: 0x00247278
|
|
[Token(Token = "0x6009EA8")]
|
|
[Address(RVA = "0x2184400", Offset = "0x2182E00", VA = "0x182184400")]
|
|
public KeccakDigest()
|
|
{
|
|
ulong[] array = new ulong[25];
|
|
this.state = array;
|
|
byte[] array2 = new byte[192];
|
|
this.dataQueue = array2;
|
|
base..ctor();
|
|
this.Init(288);
|
|
}
|
|
|
|
// Token: 0x06009EA9 RID: 40617 RVA: 0x002490B8 File Offset: 0x002472B8
|
|
[Token(Token = "0x6009EA9")]
|
|
[Address(RVA = "0x2184380", Offset = "0x2182D80", VA = "0x182184380")]
|
|
public KeccakDigest(int bitLength)
|
|
{
|
|
ulong[] array = new ulong[25];
|
|
this.state = array;
|
|
byte[] array2 = new byte[192];
|
|
this.dataQueue = array2;
|
|
base..ctor();
|
|
this.Init(bitLength);
|
|
}
|
|
|
|
// Token: 0x06009EAA RID: 40618 RVA: 0x002490F4 File Offset: 0x002472F4
|
|
[Token(Token = "0x6009EAA")]
|
|
[Address(RVA = "0x2184300", Offset = "0x2182D00", VA = "0x182184300")]
|
|
public KeccakDigest(KeccakDigest source)
|
|
{
|
|
ulong[] array = new ulong[25];
|
|
this.state = array;
|
|
byte[] array2 = new byte[192];
|
|
this.dataQueue = array2;
|
|
base..ctor();
|
|
this.CopyIn(source);
|
|
}
|
|
|
|
// Token: 0x06009EAB RID: 40619 RVA: 0x00249130 File Offset: 0x00247330
|
|
[Token(Token = "0x6009EAB")]
|
|
[Address(RVA = "0x2182930", Offset = "0x2181330", VA = "0x182182930")]
|
|
private void CopyIn(KeccakDigest source)
|
|
{
|
|
ulong[] array = source.state;
|
|
int length = array.Length;
|
|
int num = 0;
|
|
ulong[] array2 = this.state;
|
|
int num2 = 0;
|
|
Array.Copy(array, num2, array2, num, length);
|
|
byte[] array3 = source.dataQueue;
|
|
int length2 = array3.Length;
|
|
int num3 = 0;
|
|
byte[] array4 = this.dataQueue;
|
|
int num4 = 0;
|
|
Array.Copy(array3, num4, array4, num3, length2);
|
|
int num5 = source.rate;
|
|
this.rate = num5;
|
|
int num6 = source.bitsInQueue;
|
|
this.bitsInQueue = num6;
|
|
int num7 = source.fixedOutputLength;
|
|
this.fixedOutputLength = num7;
|
|
bool flag = source.squeezing;
|
|
this.squeezing = flag;
|
|
}
|
|
|
|
// Token: 0x1700190F RID: 6415
|
|
// (get) Token: 0x06009EAC RID: 40620 RVA: 0x002491D8 File Offset: 0x002473D8
|
|
[Token(Token = "0x1700190F")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x6009EAC")]
|
|
[Address(RVA = "0x2184470", Offset = "0x2182E70", VA = "0x182184470", Slot = "13")]
|
|
get
|
|
{
|
|
int num = this.fixedOutputLength;
|
|
return "Keccak-" + num;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009EAD RID: 40621 RVA: 0x002491F8 File Offset: 0x002473F8
|
|
[Token(Token = "0x6009EAD")]
|
|
[Address(RVA = "0x2182C90", Offset = "0x2181690", VA = "0x182182C90", Slot = "14")]
|
|
public virtual int GetDigestSize()
|
|
{
|
|
return this.fixedOutputLength;
|
|
}
|
|
|
|
// Token: 0x06009EAE RID: 40622 RVA: 0x0024920C File Offset: 0x0024740C
|
|
[Token(Token = "0x6009EAE")]
|
|
[Address(RVA = "0x2184210", Offset = "0x2182C10", VA = "0x182184210", Slot = "15")]
|
|
public virtual void Update(byte input)
|
|
{
|
|
byte[] array = new byte[] { input };
|
|
int num = 0;
|
|
this.Absorb(array, num, 1);
|
|
}
|
|
|
|
// Token: 0x06009EAF RID: 40623 RVA: 0x0024923C File Offset: 0x0024743C
|
|
[Token(Token = "0x6009EAF")]
|
|
[Address(RVA = "0x2182920", Offset = "0x2181320", VA = "0x182182920", Slot = "16")]
|
|
public virtual void BlockUpdate(byte[] input, int inOff, int len)
|
|
{
|
|
this.Absorb(input, inOff, len);
|
|
}
|
|
|
|
// Token: 0x06009EB0 RID: 40624 RVA: 0x00249254 File Offset: 0x00247454
|
|
[Token(Token = "0x6009EB0")]
|
|
[Address(RVA = "0x2182C30", Offset = "0x2181630", VA = "0x182182C30", Slot = "17")]
|
|
public virtual int DoFinal(byte[] output, int outOff)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009EB0)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.KeccakDigest::DoFinal(System.Byte[],System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:int32(var_0_06, ldfld:int32(KeccakDigest::fixedOutputLength, ldloc:KeccakDigest(this)))
|
|
call:void(KeccakDigest::Squeeze, ldloc:KeccakDigest(this), ldloc:uint8[](output), ldloc:int32(outOff), ldloc:int32[exp:int64](var_0_06))
|
|
stloc:IMemoable(var_3_16, call:IMemoable(IMemoable::Copy, ldloc:KeccakDigest[exp:IMemoable](this)))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009EB1 RID: 40625 RVA: 0x00249278 File Offset: 0x00247478
|
|
[Token(Token = "0x6009EB1")]
|
|
[Address(RVA = "0x2182A70", Offset = "0x2181470", VA = "0x182182A70", Slot = "18")]
|
|
protected virtual int DoFinal(byte[] output, int outOff, byte partialByte, int partialBits)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009EB1)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.KeccakDigest::DoFinal(System.Byte[],System.Int32,System.Byte,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_42:
|
|
stloc:InvalidOperationException(var_7_4C, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("attempt to absorb while squeezing")))
|
|
}
|
|
|
|
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: 0x06009EB2 RID: 40626 RVA: 0x002492D4 File Offset: 0x002474D4
|
|
[Token(Token = "0x6009EB2")]
|
|
[Address(RVA = "0x2184090", Offset = "0x2182A90", VA = "0x182184090", Slot = "19")]
|
|
public virtual void Reset()
|
|
{
|
|
int num = this.fixedOutputLength;
|
|
this.Init(num);
|
|
}
|
|
|
|
// Token: 0x06009EB3 RID: 40627 RVA: 0x002492F0 File Offset: 0x002474F0
|
|
[Token(Token = "0x6009EB3")]
|
|
[Address(RVA = "0x2182C80", Offset = "0x2181680", VA = "0x182182C80", Slot = "20")]
|
|
public virtual int GetByteLength()
|
|
{
|
|
return this.rate;
|
|
}
|
|
|
|
// Token: 0x06009EB4 RID: 40628 RVA: 0x00249304 File Offset: 0x00247504
|
|
[Token(Token = "0x6009EB4")]
|
|
[Address(RVA = "0x2182D90", Offset = "0x2181790", VA = "0x182182D90")]
|
|
private void Init(int bitLength)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009EB4)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.KeccakDigest::Init(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_9C:
|
|
stloc:ArgumentException(var_7_AB, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("must be one of 128, 224, 256, 288, 384, or 512."), ldstr:string("bitLength")))
|
|
}
|
|
|
|
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: 0x06009EB5 RID: 40629 RVA: 0x002493C0 File Offset: 0x002475C0
|
|
[Token(Token = "0x6009EB5")]
|
|
[Address(RVA = "0x2182CA0", Offset = "0x21816A0", VA = "0x182182CA0")]
|
|
private void InitSponge(int rate)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009EB5)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.KeccakDigest::InitSponge(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_5F:
|
|
stloc:InvalidOperationException(var_6_69, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("invalid rate value")))
|
|
}
|
|
|
|
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: 0x06009EB6 RID: 40630 RVA: 0x00249438 File Offset: 0x00247638
|
|
[Token(Token = "0x6009EB6")]
|
|
[Address(RVA = "0x2182780", Offset = "0x2181180", VA = "0x182182780")]
|
|
protected void Absorb(byte[] data, int off, int len)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009EB6)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.KeccakDigest::Absorb(System.Byte[],System.Int32,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_82:
|
|
stloc:InvalidOperationException(var_9_8C, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("attempt to absorb while squeezing")))
|
|
}
|
|
|
|
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: 0x06009EB7 RID: 40631 RVA: 0x002494D4 File Offset: 0x002476D4
|
|
[Token(Token = "0x6009EB7")]
|
|
[Address(RVA = "0x2182630", Offset = "0x2181030", VA = "0x182182630")]
|
|
protected void AbsorbBits(int data, int bits)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009EB7)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.KeccakDigest::AbsorbBits(System.Int32,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_37:
|
|
stloc:InvalidOperationException(var_5_41, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("attempt to absorb while squeezing")))
|
|
}
|
|
|
|
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: 0x06009EB8 RID: 40632 RVA: 0x00249524 File Offset: 0x00247724
|
|
[Token(Token = "0x6009EB8")]
|
|
[Address(RVA = "0x2183E00", Offset = "0x2182800", VA = "0x182183E00")]
|
|
private void PadAndSwitchToSqueezingPhase()
|
|
{
|
|
byte[] array = this.dataQueue;
|
|
int num = this.bitsInQueue;
|
|
array += num;
|
|
int num2 = 0;
|
|
array[0] = (byte)num;
|
|
int num3 = this.bitsInQueue;
|
|
num3++;
|
|
this.bitsInQueue = num3;
|
|
if (num3 == this.rate)
|
|
{
|
|
byte[] array2 = this.dataQueue;
|
|
int num4 = 0;
|
|
this.KeccakAbsorb(array2, num4);
|
|
this.bitsInQueue = num2;
|
|
}
|
|
ulong[] array3;
|
|
int num6;
|
|
if (num3 > 0)
|
|
{
|
|
array3 = this.state;
|
|
ulong num5 = Pack.LE_To_UInt64(this.dataQueue, num2);
|
|
num2 += 8;
|
|
num2++;
|
|
array3[0] = num5;
|
|
num6 = 0;
|
|
}
|
|
if (num3 != 0)
|
|
{
|
|
ulong[] array4 = this.state;
|
|
ulong num7 = Pack.LE_To_UInt64(this.dataQueue, num2);
|
|
array3[0] = num7;
|
|
}
|
|
ulong[] array5 = this.state;
|
|
int num8 = this.rate;
|
|
this.KeccakPermutation();
|
|
int num9 = this.rate;
|
|
int num10 = 0;
|
|
byte[] array6 = this.dataQueue;
|
|
Pack.UInt64_To_LE(this.state, num10, num9, array6, num6);
|
|
int num11 = this.rate;
|
|
this.bitsInQueue = num11;
|
|
this.squeezing = true;
|
|
}
|
|
|
|
// Token: 0x06009EB9 RID: 40633 RVA: 0x00249630 File Offset: 0x00247830
|
|
[Token(Token = "0x6009EB9")]
|
|
[Address(RVA = "0x21840A0", Offset = "0x2182AA0", VA = "0x1821840A0")]
|
|
protected void Squeeze(byte[] output, int offset, long outputLength)
|
|
{
|
|
if (!this.squeezing)
|
|
{
|
|
this.PadAndSwitchToSqueezingPhase();
|
|
}
|
|
int num = 0;
|
|
int num4;
|
|
if (this.bitsInQueue == 0)
|
|
{
|
|
this.KeccakPermutation();
|
|
int num2 = this.rate;
|
|
int num3 = 0;
|
|
byte[] array = this.dataQueue;
|
|
Pack.UInt64_To_LE(this.state, num3, num2, array, num);
|
|
num4 = this.rate;
|
|
this.bitsInQueue = num4;
|
|
}
|
|
long num5 = Math.Min((long)num4, outputLength);
|
|
int num6 = this.rate;
|
|
byte[] array2 = this.dataQueue;
|
|
num += offset;
|
|
Array.Copy(array2, num6, output, num, (int)num5);
|
|
num = (int)((long)num + num5);
|
|
}
|
|
|
|
// Token: 0x06009EBA RID: 40634 RVA: 0x002496C8 File Offset: 0x002478C8
|
|
[Token(Token = "0x6009EBA")]
|
|
[Address(RVA = "0x2182F30", Offset = "0x2181930", VA = "0x182182F30")]
|
|
private void KeccakAbsorb(byte[] data, int off)
|
|
{
|
|
int num = this.rate;
|
|
int num2 = 0;
|
|
if (num > 0)
|
|
{
|
|
ulong[] array = this.state;
|
|
ulong num3 = Pack.LE_To_UInt64(data, off);
|
|
num2++;
|
|
}
|
|
this.KeccakPermutation();
|
|
}
|
|
|
|
// Token: 0x06009EBB RID: 40635 RVA: 0x00249704 File Offset: 0x00247904
|
|
[Token(Token = "0x6009EBB")]
|
|
[Address(RVA = "0x2182FE0", Offset = "0x21819E0", VA = "0x182182FE0")]
|
|
private void KeccakExtract()
|
|
{
|
|
int num = this.rate;
|
|
int num2 = 0;
|
|
byte[] array = this.dataQueue;
|
|
int num3 = 0;
|
|
Pack.UInt64_To_LE(this.state, num3, num, array, num2);
|
|
}
|
|
|
|
// Token: 0x06009EBC RID: 40636 RVA: 0x00249734 File Offset: 0x00247934
|
|
[Token(Token = "0x6009EBC")]
|
|
[Address(RVA = "0x2183010", Offset = "0x2181A10", VA = "0x182183010")]
|
|
private void KeccakPermutation()
|
|
{
|
|
ulong[] array = this.state;
|
|
int length = array.Length;
|
|
ulong num = array[0];
|
|
ulong num2 = array[1];
|
|
ulong num3 = array[2];
|
|
ulong num4 = array[3];
|
|
ulong num5 = array[4];
|
|
ulong num6 = array[5];
|
|
ulong num7 = array[6];
|
|
ulong num8 = array[7];
|
|
ulong num9 = array[8];
|
|
ulong num10 = array[9];
|
|
ulong num11 = array[10];
|
|
ulong num12 = array[11];
|
|
ulong num13 = array[12];
|
|
ulong num14 = array[13];
|
|
ulong num15 = array[14];
|
|
ulong num16 = array[15];
|
|
ulong num17 = array[16];
|
|
ulong num18 = array[17];
|
|
ulong num19 = array[18];
|
|
ulong num20 = array[19];
|
|
ulong num21 = array[20];
|
|
ulong num22 = array[21];
|
|
ulong num23 = array[22];
|
|
ulong num24 = array[23];
|
|
ulong num25 = array[24];
|
|
int num26 = 0;
|
|
num22 = num23;
|
|
num3 = num24;
|
|
num10 = num3;
|
|
num15 = num21;
|
|
num21 = num13;
|
|
num20 = num24;
|
|
num3 = num25;
|
|
num24 = num16;
|
|
num25 = num22;
|
|
num5 = num19;
|
|
num6 = num5;
|
|
num7 = num6;
|
|
num12 = num3;
|
|
num3 = num15;
|
|
num2 = num12;
|
|
num19 = num20;
|
|
num6 = num7;
|
|
num5 = num7;
|
|
num12 = num24;
|
|
num16 = num5;
|
|
ulong[] keccakRoundConstants = KeccakDigest.KeccakRoundConstants;
|
|
num26++;
|
|
array[0] = num;
|
|
array[1] = num7;
|
|
array[2] = num21;
|
|
array[3] = num5;
|
|
array[4] = num3;
|
|
array[5] = num6;
|
|
num7 = num6;
|
|
array[6] = num7;
|
|
array[7] = num12;
|
|
array[8] = num5;
|
|
array[9] = num7;
|
|
array[10] = num2;
|
|
array[11] = num12;
|
|
array[12] = num3;
|
|
array[13] = num3;
|
|
array[14] = num15;
|
|
array[15] = num16;
|
|
array[16] = num5;
|
|
array[17] = num19;
|
|
array[18] = num19;
|
|
num6 = num20;
|
|
array[19] = num6;
|
|
array[20] = num10;
|
|
array[21] = num5;
|
|
array[22] = num7;
|
|
array[23] = num24;
|
|
array[24] = num25;
|
|
}
|
|
|
|
// Token: 0x06009EBD RID: 40637 RVA: 0x00249A30 File Offset: 0x00247C30
|
|
[Token(Token = "0x6009EBD")]
|
|
[Address(RVA = "0x21829C0", Offset = "0x21813C0", VA = "0x1821829C0", Slot = "21")]
|
|
public virtual IMemoable Copy()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009EBD)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.KeccakDigest::Copy()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:KeccakDigest(var_0_05, newobj:KeccakDigest(KeccakDigest::.ctor))
|
|
stloc:uint64[](var_1_0D, newarr:uint64[]([mscorlib]System.UInt64, ldc.i4:int32(25)))
|
|
stfld:uint64[](KeccakDigest::state, ldloc:KeccakDigest(var_0_05), ldloc:uint64[](var_1_0D))
|
|
stloc:uint8[](var_2_1F, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(192)))
|
|
stfld:uint8[](KeccakDigest::dataQueue, ldloc:KeccakDigest(var_0_05), ldloc:uint8[](var_2_1F))
|
|
call:void(KeccakDigest::CopyIn, ldloc:KeccakDigest(var_0_05), ldloc:KeccakDigest(this))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009EBE RID: 40638 RVA: 0x00249A6C File Offset: 0x00247C6C
|
|
[Token(Token = "0x6009EBE")]
|
|
[Address(RVA = "0x2183FF0", Offset = "0x21829F0", VA = "0x182183FF0", Slot = "22")]
|
|
public virtual void Reset(IMemoable other)
|
|
{
|
|
do
|
|
{
|
|
if (other == 0)
|
|
{
|
|
}
|
|
}
|
|
while (other == 0);
|
|
}
|
|
|
|
// Token: 0x06009EBF RID: 40639 RVA: 0x00249A84 File Offset: 0x00247C84
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x6009EBF")]
|
|
[Address(RVA = "0x21842A0", Offset = "0x2182CA0", VA = "0x1821842A0")]
|
|
static KeccakDigest()
|
|
{
|
|
ulong[] array = new ulong[24];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.6BBA9E7ACC5D57E30438CC78FF7E308399E10FE1).FieldHandle);
|
|
KeccakDigest.KeccakRoundConstants = array;
|
|
}
|
|
|
|
// Token: 0x04006855 RID: 26709
|
|
[Token(Token = "0x4006855")]
|
|
private static readonly ulong[] KeccakRoundConstants;
|
|
|
|
// Token: 0x04006856 RID: 26710
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006856")]
|
|
private ulong[] state;
|
|
|
|
// Token: 0x04006857 RID: 26711
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006857")]
|
|
protected byte[] dataQueue;
|
|
|
|
// Token: 0x04006858 RID: 26712
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4006858")]
|
|
protected int rate;
|
|
|
|
// Token: 0x04006859 RID: 26713
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x24")]
|
|
[Token(Token = "0x4006859")]
|
|
protected int bitsInQueue;
|
|
|
|
// Token: 0x0400685A RID: 26714
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400685A")]
|
|
protected int fixedOutputLength;
|
|
|
|
// Token: 0x0400685B RID: 26715
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
|
|
[Token(Token = "0x400685B")]
|
|
protected bool squeezing;
|
|
}
|
|
}
|