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: 0x02001CE8 RID: 7400
|
|
[Token(Token = "0x2001CE8")]
|
|
public class KeccakDigest : IDigest, IMemoable
|
|
{
|
|
// Token: 0x0600BA82 RID: 47746 RVA: 0x002A118C File Offset: 0x0029F38C
|
|
[Token(Token = "0x600BA82")]
|
|
[Address(RVA = "0x1B411B0", Offset = "0x1B3FFB0", VA = "0x181B411B0")]
|
|
public KeccakDigest()
|
|
{
|
|
ulong[] array = new ulong[25];
|
|
this.state = array;
|
|
byte[] array2 = new byte[192];
|
|
this.dataQueue = array2;
|
|
base..ctor();
|
|
this.Init(288);
|
|
}
|
|
|
|
// Token: 0x0600BA83 RID: 47747 RVA: 0x002A11CC File Offset: 0x0029F3CC
|
|
[Token(Token = "0x600BA83")]
|
|
[Address(RVA = "0x1B41130", Offset = "0x1B3FF30", VA = "0x181B41130")]
|
|
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: 0x0600BA84 RID: 47748 RVA: 0x002A1208 File Offset: 0x0029F408
|
|
[Token(Token = "0x600BA84")]
|
|
[Address(RVA = "0x1B410B0", Offset = "0x1B3FEB0", VA = "0x181B410B0")]
|
|
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: 0x0600BA85 RID: 47749 RVA: 0x002A1244 File Offset: 0x0029F444
|
|
[Token(Token = "0x600BA85")]
|
|
[Address(RVA = "0x1B3F6E0", Offset = "0x1B3E4E0", VA = "0x181B3F6E0")]
|
|
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: 0x17001D10 RID: 7440
|
|
// (get) Token: 0x0600BA86 RID: 47750 RVA: 0x002A12EC File Offset: 0x0029F4EC
|
|
[Token(Token = "0x17001D10")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600BA86")]
|
|
[Address(RVA = "0x1B41220", Offset = "0x1B40020", VA = "0x181B41220", Slot = "13")]
|
|
get
|
|
{
|
|
int num = this.fixedOutputLength;
|
|
return "Keccak-" + num;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA87 RID: 47751 RVA: 0x002A130C File Offset: 0x0029F50C
|
|
[Token(Token = "0x600BA87")]
|
|
[Address(RVA = "0x1B3FA40", Offset = "0x1B3E840", VA = "0x181B3FA40", Slot = "14")]
|
|
public virtual int GetDigestSize()
|
|
{
|
|
return this.fixedOutputLength;
|
|
}
|
|
|
|
// Token: 0x0600BA88 RID: 47752 RVA: 0x002A1320 File Offset: 0x0029F520
|
|
[Token(Token = "0x600BA88")]
|
|
[Address(RVA = "0x1B40FC0", Offset = "0x1B3FDC0", VA = "0x181B40FC0", Slot = "15")]
|
|
public virtual void Update(byte input)
|
|
{
|
|
byte[] array = new byte[] { input };
|
|
int num = 0;
|
|
this.Absorb(array, num, 1);
|
|
}
|
|
|
|
// Token: 0x0600BA89 RID: 47753 RVA: 0x002A1350 File Offset: 0x0029F550
|
|
[Token(Token = "0x600BA89")]
|
|
[Address(RVA = "0x1B3F6D0", Offset = "0x1B3E4D0", VA = "0x181B3F6D0", Slot = "16")]
|
|
public virtual void BlockUpdate(byte[] input, int inOff, int len)
|
|
{
|
|
this.Absorb(input, inOff, len);
|
|
}
|
|
|
|
// Token: 0x0600BA8A RID: 47754 RVA: 0x002A1368 File Offset: 0x0029F568
|
|
[Token(Token = "0x600BA8A")]
|
|
[Address(RVA = "0x1B3F9E0", Offset = "0x1B3E7E0", VA = "0x181B3F9E0", Slot = "17")]
|
|
public virtual int DoFinal(byte[] output, int outOff)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA8A)
|
|
|
|
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: 0x0600BA8B RID: 47755 RVA: 0x002A138C File Offset: 0x0029F58C
|
|
[Token(Token = "0x600BA8B")]
|
|
[Address(RVA = "0x1B3F820", Offset = "0x1B3E620", VA = "0x181B3F820", Slot = "18")]
|
|
protected virtual int DoFinal(byte[] output, int outOff, byte partialByte, int partialBits)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA8B)
|
|
|
|
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: 0x0600BA8C RID: 47756 RVA: 0x002A13E8 File Offset: 0x0029F5E8
|
|
[Token(Token = "0x600BA8C")]
|
|
[Address(RVA = "0x1B40E40", Offset = "0x1B3FC40", VA = "0x181B40E40", Slot = "19")]
|
|
public virtual void Reset()
|
|
{
|
|
int num = this.fixedOutputLength;
|
|
this.Init(num);
|
|
}
|
|
|
|
// Token: 0x0600BA8D RID: 47757 RVA: 0x002A1404 File Offset: 0x0029F604
|
|
[Token(Token = "0x600BA8D")]
|
|
[Address(RVA = "0x1B3FA30", Offset = "0x1B3E830", VA = "0x181B3FA30", Slot = "20")]
|
|
public virtual int GetByteLength()
|
|
{
|
|
return this.rate;
|
|
}
|
|
|
|
// Token: 0x0600BA8E RID: 47758 RVA: 0x002A1418 File Offset: 0x0029F618
|
|
[Token(Token = "0x600BA8E")]
|
|
[Address(RVA = "0x1B3FB40", Offset = "0x1B3E940", VA = "0x181B3FB40")]
|
|
private void Init(int bitLength)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA8E)
|
|
|
|
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: 0x0600BA8F RID: 47759 RVA: 0x002A14D4 File Offset: 0x0029F6D4
|
|
[Token(Token = "0x600BA8F")]
|
|
[Address(RVA = "0x1B3FA50", Offset = "0x1B3E850", VA = "0x181B3FA50")]
|
|
private void InitSponge(int rate)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA8F)
|
|
|
|
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: 0x0600BA90 RID: 47760 RVA: 0x002A154C File Offset: 0x0029F74C
|
|
[Token(Token = "0x600BA90")]
|
|
[Address(RVA = "0x1B3F530", Offset = "0x1B3E330", VA = "0x181B3F530")]
|
|
protected void Absorb(byte[] data, int off, int len)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA90)
|
|
|
|
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: 0x0600BA91 RID: 47761 RVA: 0x002A15E8 File Offset: 0x0029F7E8
|
|
[Token(Token = "0x600BA91")]
|
|
[Address(RVA = "0x1B3F3E0", Offset = "0x1B3E1E0", VA = "0x181B3F3E0")]
|
|
protected void AbsorbBits(int data, int bits)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA91)
|
|
|
|
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: 0x0600BA92 RID: 47762 RVA: 0x002A1638 File Offset: 0x0029F838
|
|
[Token(Token = "0x600BA92")]
|
|
[Address(RVA = "0x1B40BB0", Offset = "0x1B3F9B0", VA = "0x181B40BB0")]
|
|
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: 0x0600BA93 RID: 47763 RVA: 0x002A1744 File Offset: 0x0029F944
|
|
[Token(Token = "0x600BA93")]
|
|
[Address(RVA = "0x1B40E50", Offset = "0x1B3FC50", VA = "0x181B40E50")]
|
|
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: 0x0600BA94 RID: 47764 RVA: 0x002A17DC File Offset: 0x0029F9DC
|
|
[Token(Token = "0x600BA94")]
|
|
[Address(RVA = "0x1B3FCE0", Offset = "0x1B3EAE0", VA = "0x181B3FCE0")]
|
|
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: 0x0600BA95 RID: 47765 RVA: 0x002A1818 File Offset: 0x0029FA18
|
|
[Token(Token = "0x600BA95")]
|
|
[Address(RVA = "0x1B3FD90", Offset = "0x1B3EB90", VA = "0x181B3FD90")]
|
|
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: 0x0600BA96 RID: 47766 RVA: 0x002A1848 File Offset: 0x0029FA48
|
|
[Token(Token = "0x600BA96")]
|
|
[Address(RVA = "0x1B3FDC0", Offset = "0x1B3EBC0", VA = "0x181B3FDC0")]
|
|
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: 0x0600BA97 RID: 47767 RVA: 0x002A1B44 File Offset: 0x0029FD44
|
|
[Token(Token = "0x600BA97")]
|
|
[Address(RVA = "0x1B3F770", Offset = "0x1B3E570", VA = "0x181B3F770", Slot = "21")]
|
|
public virtual IMemoable Copy()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA97)
|
|
|
|
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: 0x0600BA98 RID: 47768 RVA: 0x002A1B80 File Offset: 0x0029FD80
|
|
[Token(Token = "0x600BA98")]
|
|
[Address(RVA = "0x1B40DA0", Offset = "0x1B3FBA0", VA = "0x181B40DA0", Slot = "22")]
|
|
public virtual void Reset(IMemoable other)
|
|
{
|
|
do
|
|
{
|
|
if (other == 0)
|
|
{
|
|
}
|
|
}
|
|
while (other == 0);
|
|
}
|
|
|
|
// Token: 0x0600BA99 RID: 47769 RVA: 0x002A1B98 File Offset: 0x0029FD98
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x600BA99")]
|
|
[Address(RVA = "0x1B41050", Offset = "0x1B3FE50", VA = "0x181B41050")]
|
|
static KeccakDigest()
|
|
{
|
|
ulong[] array = new ulong[24];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.6BBA9E7ACC5D57E30438CC78FF7E308399E10FE1).FieldHandle);
|
|
KeccakDigest.KeccakRoundConstants = array;
|
|
}
|
|
|
|
// Token: 0x04007698 RID: 30360
|
|
[Token(Token = "0x4007698")]
|
|
private static readonly ulong[] KeccakRoundConstants;
|
|
|
|
// Token: 0x04007699 RID: 30361
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007699")]
|
|
private ulong[] state;
|
|
|
|
// Token: 0x0400769A RID: 30362
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400769A")]
|
|
protected byte[] dataQueue;
|
|
|
|
// Token: 0x0400769B RID: 30363
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400769B")]
|
|
protected int rate;
|
|
|
|
// Token: 0x0400769C RID: 30364
|
|
[FieldOffset(Offset = "0x24")]
|
|
[Token(Token = "0x400769C")]
|
|
protected int bitsInQueue;
|
|
|
|
// Token: 0x0400769D RID: 30365
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400769D")]
|
|
protected int fixedOutputLength;
|
|
|
|
// Token: 0x0400769E RID: 30366
|
|
[FieldOffset(Offset = "0x2C")]
|
|
[Token(Token = "0x400769E")]
|
|
protected bool squeezing;
|
|
}
|
|
}
|