578 lines
31 KiB
C#
578 lines
31 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
|
|
{
|
|
// Token: 0x02001DC8 RID: 7624
|
|
[Token(Token = "0x2001DC8")]
|
|
public class KeccakDigest : IDigest, IMemoable
|
|
{
|
|
// Token: 0x0600BE50 RID: 48720 RVA: 0x002A9B34 File Offset: 0x002A7D34
|
|
[Token(Token = "0x600BE50")]
|
|
[Address(RVA = "0x25AB3C0", Offset = "0x25AA3C0", VA = "0x1825AB3C0")]
|
|
public KeccakDigest()
|
|
{
|
|
ulong[] array = new ulong[25];
|
|
this.state = array;
|
|
byte[] array2 = new byte[192];
|
|
this.dataQueue = array2;
|
|
base..ctor();
|
|
this.Init(288);
|
|
}
|
|
|
|
// Token: 0x0600BE51 RID: 48721 RVA: 0x002A9B74 File Offset: 0x002A7D74
|
|
[Token(Token = "0x600BE51")]
|
|
[Address(RVA = "0x25AB340", Offset = "0x25AA340", VA = "0x1825AB340")]
|
|
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: 0x0600BE52 RID: 48722 RVA: 0x002A9BB0 File Offset: 0x002A7DB0
|
|
[Token(Token = "0x600BE52")]
|
|
[Address(RVA = "0x25AB2C0", Offset = "0x25AA2C0", VA = "0x1825AB2C0")]
|
|
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: 0x0600BE53 RID: 48723 RVA: 0x002A9BEC File Offset: 0x002A7DEC
|
|
[Token(Token = "0x600BE53")]
|
|
[Address(RVA = "0x25A98F0", Offset = "0x25A88F0", VA = "0x1825A98F0")]
|
|
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: 0x17001DAD RID: 7597
|
|
// (get) Token: 0x0600BE54 RID: 48724 RVA: 0x002A9C94 File Offset: 0x002A7E94
|
|
[Token(Token = "0x17001DAD")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600BE54")]
|
|
[Address(RVA = "0x25AB430", Offset = "0x25AA430", VA = "0x1825AB430", Slot = "13")]
|
|
get
|
|
{
|
|
int num = this.fixedOutputLength;
|
|
return "Keccak-" + num;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BE55 RID: 48725 RVA: 0x002A9CB4 File Offset: 0x002A7EB4
|
|
[Token(Token = "0x600BE55")]
|
|
[Address(RVA = "0x25A9C50", Offset = "0x25A8C50", VA = "0x1825A9C50", Slot = "14")]
|
|
public virtual int GetDigestSize()
|
|
{
|
|
return this.fixedOutputLength;
|
|
}
|
|
|
|
// Token: 0x0600BE56 RID: 48726 RVA: 0x002A9CC8 File Offset: 0x002A7EC8
|
|
[Token(Token = "0x600BE56")]
|
|
[Address(RVA = "0x25AB1D0", Offset = "0x25AA1D0", VA = "0x1825AB1D0", Slot = "15")]
|
|
public virtual void Update(byte input)
|
|
{
|
|
byte[] array = new byte[] { input };
|
|
int num = 0;
|
|
this.Absorb(array, num, 1);
|
|
}
|
|
|
|
// Token: 0x0600BE57 RID: 48727 RVA: 0x002A9CF8 File Offset: 0x002A7EF8
|
|
[Token(Token = "0x600BE57")]
|
|
[Address(RVA = "0x25A98E0", Offset = "0x25A88E0", VA = "0x1825A98E0", Slot = "16")]
|
|
public virtual void BlockUpdate(byte[] input, int inOff, int len)
|
|
{
|
|
this.Absorb(input, inOff, len);
|
|
}
|
|
|
|
// Token: 0x0600BE58 RID: 48728 RVA: 0x002A9D10 File Offset: 0x002A7F10
|
|
[Token(Token = "0x600BE58")]
|
|
[Address(RVA = "0x25A9BF0", Offset = "0x25A8BF0", VA = "0x1825A9BF0", Slot = "17")]
|
|
public virtual int DoFinal(byte[] output, int outOff)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BE58)
|
|
|
|
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: 0x0600BE59 RID: 48729 RVA: 0x002A9D34 File Offset: 0x002A7F34
|
|
[Token(Token = "0x600BE59")]
|
|
[Address(RVA = "0x25A9A30", Offset = "0x25A8A30", VA = "0x1825A9A30", Slot = "18")]
|
|
protected virtual int DoFinal(byte[] output, int outOff, byte partialByte, int partialBits)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BE59)
|
|
|
|
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: 0x0600BE5A RID: 48730 RVA: 0x002A9D90 File Offset: 0x002A7F90
|
|
[Token(Token = "0x600BE5A")]
|
|
[Address(RVA = "0x25AB050", Offset = "0x25AA050", VA = "0x1825AB050", Slot = "19")]
|
|
public virtual void Reset()
|
|
{
|
|
int num = this.fixedOutputLength;
|
|
this.Init(num);
|
|
}
|
|
|
|
// Token: 0x0600BE5B RID: 48731 RVA: 0x002A9DAC File Offset: 0x002A7FAC
|
|
[Token(Token = "0x600BE5B")]
|
|
[Address(RVA = "0x25A9C40", Offset = "0x25A8C40", VA = "0x1825A9C40", Slot = "20")]
|
|
public virtual int GetByteLength()
|
|
{
|
|
return this.rate;
|
|
}
|
|
|
|
// Token: 0x0600BE5C RID: 48732 RVA: 0x002A9DC0 File Offset: 0x002A7FC0
|
|
[Token(Token = "0x600BE5C")]
|
|
[Address(RVA = "0x25A9D50", Offset = "0x25A8D50", VA = "0x1825A9D50")]
|
|
private void Init(int bitLength)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BE5C)
|
|
|
|
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: 0x0600BE5D RID: 48733 RVA: 0x002A9E7C File Offset: 0x002A807C
|
|
[Token(Token = "0x600BE5D")]
|
|
[Address(RVA = "0x25A9C60", Offset = "0x25A8C60", VA = "0x1825A9C60")]
|
|
private void InitSponge(int rate)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BE5D)
|
|
|
|
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: 0x0600BE5E RID: 48734 RVA: 0x002A9EF4 File Offset: 0x002A80F4
|
|
[Token(Token = "0x600BE5E")]
|
|
[Address(RVA = "0x25A9740", Offset = "0x25A8740", VA = "0x1825A9740")]
|
|
protected void Absorb(byte[] data, int off, int len)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BE5E)
|
|
|
|
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: 0x0600BE5F RID: 48735 RVA: 0x002A9F90 File Offset: 0x002A8190
|
|
[Token(Token = "0x600BE5F")]
|
|
[Address(RVA = "0x25A95F0", Offset = "0x25A85F0", VA = "0x1825A95F0")]
|
|
protected void AbsorbBits(int data, int bits)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BE5F)
|
|
|
|
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: 0x0600BE60 RID: 48736 RVA: 0x002A9FE0 File Offset: 0x002A81E0
|
|
[Token(Token = "0x600BE60")]
|
|
[Address(RVA = "0x25AADC0", Offset = "0x25A9DC0", VA = "0x1825AADC0")]
|
|
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: 0x0600BE61 RID: 48737 RVA: 0x002AA0EC File Offset: 0x002A82EC
|
|
[Token(Token = "0x600BE61")]
|
|
[Address(RVA = "0x25AB060", Offset = "0x25AA060", VA = "0x1825AB060")]
|
|
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: 0x0600BE62 RID: 48738 RVA: 0x002AA184 File Offset: 0x002A8384
|
|
[Token(Token = "0x600BE62")]
|
|
[Address(RVA = "0x25A9EF0", Offset = "0x25A8EF0", VA = "0x1825A9EF0")]
|
|
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: 0x0600BE63 RID: 48739 RVA: 0x002AA1C0 File Offset: 0x002A83C0
|
|
[Token(Token = "0x600BE63")]
|
|
[Address(RVA = "0x25A9FA0", Offset = "0x25A8FA0", VA = "0x1825A9FA0")]
|
|
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: 0x0600BE64 RID: 48740 RVA: 0x002AA1F0 File Offset: 0x002A83F0
|
|
[Token(Token = "0x600BE64")]
|
|
[Address(RVA = "0x25A9FD0", Offset = "0x25A8FD0", VA = "0x1825A9FD0")]
|
|
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: 0x0600BE65 RID: 48741 RVA: 0x002AA4EC File Offset: 0x002A86EC
|
|
[Token(Token = "0x600BE65")]
|
|
[Address(RVA = "0x25A9980", Offset = "0x25A8980", VA = "0x1825A9980", Slot = "21")]
|
|
public virtual IMemoable Copy()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BE65)
|
|
|
|
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: 0x0600BE66 RID: 48742 RVA: 0x002AA528 File Offset: 0x002A8728
|
|
[Token(Token = "0x600BE66")]
|
|
[Address(RVA = "0x25AAFB0", Offset = "0x25A9FB0", VA = "0x1825AAFB0", Slot = "22")]
|
|
public virtual void Reset(IMemoable other)
|
|
{
|
|
do
|
|
{
|
|
if (other == 0)
|
|
{
|
|
}
|
|
}
|
|
while (other == 0);
|
|
}
|
|
|
|
// Token: 0x0600BE67 RID: 48743 RVA: 0x002AA540 File Offset: 0x002A8740
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x600BE67")]
|
|
[Address(RVA = "0x25AB260", Offset = "0x25AA260", VA = "0x1825AB260")]
|
|
static KeccakDigest()
|
|
{
|
|
ulong[] array = new ulong[24];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.6BBA9E7ACC5D57E30438CC78FF7E308399E10FE1).FieldHandle);
|
|
KeccakDigest.KeccakRoundConstants = array;
|
|
}
|
|
|
|
// Token: 0x04007851 RID: 30801
|
|
[Token(Token = "0x4007851")]
|
|
private static readonly ulong[] KeccakRoundConstants;
|
|
|
|
// Token: 0x04007852 RID: 30802
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007852")]
|
|
private ulong[] state;
|
|
|
|
// Token: 0x04007853 RID: 30803
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007853")]
|
|
protected byte[] dataQueue;
|
|
|
|
// Token: 0x04007854 RID: 30804
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007854")]
|
|
protected int rate;
|
|
|
|
// Token: 0x04007855 RID: 30805
|
|
[FieldOffset(Offset = "0x24")]
|
|
[Token(Token = "0x4007855")]
|
|
protected int bitsInQueue;
|
|
|
|
// Token: 0x04007856 RID: 30806
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4007856")]
|
|
protected int fixedOutputLength;
|
|
|
|
// Token: 0x04007857 RID: 30807
|
|
[FieldOffset(Offset = "0x2C")]
|
|
[Token(Token = "0x4007857")]
|
|
protected bool squeezing;
|
|
}
|
|
}
|