181 lines
12 KiB
C#
181 lines
12 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
|
|
{
|
|
// Token: 0x0200171E RID: 5918
|
|
[Token(Token = "0x200171E")]
|
|
[StructLayout(3)]
|
|
public class ShakeDigest : KeccakDigest, IXof, IDigest
|
|
{
|
|
// Token: 0x06009FDE RID: 40926 RVA: 0x00250FA0 File Offset: 0x0024F1A0
|
|
[Token(Token = "0x6009FDE")]
|
|
[Address(RVA = "0x22509A0", Offset = "0x224F3A0", VA = "0x1822509A0")]
|
|
private static int CheckBitLength(int bitLength)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009FDE)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.ShakeDigest::CheckBitLength(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_12:
|
|
stloc:ArgumentException(var_1_1D, newobj:ArgumentException(ArgumentException::.ctor, ldloc:string(var_0), 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.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: 0x06009FDF RID: 40927 RVA: 0x00250FCC File Offset: 0x0024F1CC
|
|
[Token(Token = "0x6009FDF")]
|
|
[Address(RVA = "0x2250F50", Offset = "0x224F950", VA = "0x182250F50")]
|
|
public ShakeDigest()
|
|
: base(128)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06009FE0 RID: 40928 RVA: 0x00250FE4 File Offset: 0x0024F1E4
|
|
[Token(Token = "0x6009FE0")]
|
|
[Address(RVA = "0x2250DF0", Offset = "0x224F7F0", VA = "0x182250DF0")]
|
|
public ShakeDigest(int bitLength)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009FE0)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.ShakeDigest::.ctor(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_18:
|
|
stloc:ArgumentException(var_1_23, newobj:ArgumentException(ArgumentException::.ctor, ldloc:string(var_0), 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.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: 0x06009FE1 RID: 40929 RVA: 0x00251014 File Offset: 0x0024F214
|
|
[Token(Token = "0x6009FE1")]
|
|
[Address(RVA = "0x2250EE0", Offset = "0x224F8E0", VA = "0x182250EE0")]
|
|
public ShakeDigest(ShakeDigest source)
|
|
: base(source)
|
|
{
|
|
}
|
|
|
|
// Token: 0x17001922 RID: 6434
|
|
// (get) Token: 0x06009FE2 RID: 40930 RVA: 0x00251028 File Offset: 0x0024F228
|
|
[Token(Token = "0x17001922")]
|
|
public override string AlgorithmName
|
|
{
|
|
[Token(Token = "0x6009FE2")]
|
|
[Address(RVA = "0x2250FD0", Offset = "0x224F9D0", VA = "0x182250FD0", Slot = "13")]
|
|
get
|
|
{
|
|
int fixedOutputLength = this.fixedOutputLength;
|
|
return "SHAKE" + fixedOutputLength;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009FE3 RID: 40931 RVA: 0x00251048 File Offset: 0x0024F248
|
|
[Token(Token = "0x6009FE3")]
|
|
[Address(RVA = "0x2250AE0", Offset = "0x224F4E0", VA = "0x182250AE0", Slot = "17")]
|
|
public override int DoFinal(byte[] output, int outOff)
|
|
{
|
|
string algorithmName = this.AlgorithmName;
|
|
int num;
|
|
return num;
|
|
}
|
|
|
|
// Token: 0x06009FE4 RID: 40932 RVA: 0x00251060 File Offset: 0x0024F260
|
|
[Token(Token = "0x6009FE4")]
|
|
[Address(RVA = "0x2250CB0", Offset = "0x224F6B0", VA = "0x182250CB0", Slot = "25")]
|
|
public virtual int DoFinal(byte[] output, int outOff, int outLen)
|
|
{
|
|
int num = this.DoFinal(output, outOff, outLen);
|
|
return outLen;
|
|
}
|
|
|
|
// Token: 0x06009FE5 RID: 40933 RVA: 0x00251078 File Offset: 0x0024F278
|
|
[Token(Token = "0x6009FE5")]
|
|
[Address(RVA = "0x2250D80", Offset = "0x224F780", VA = "0x182250D80", Slot = "26")]
|
|
public virtual int DoOutput(byte[] output, int outOff, int outLen)
|
|
{
|
|
base.AbsorbBits(15, 4);
|
|
base.Squeeze(output, outOff, (long)outLen);
|
|
return outLen;
|
|
}
|
|
|
|
// Token: 0x06009FE6 RID: 40934 RVA: 0x00251098 File Offset: 0x0024F298
|
|
[Token(Token = "0x6009FE6")]
|
|
[Address(RVA = "0x2250D00", Offset = "0x224F700", VA = "0x182250D00", Slot = "18")]
|
|
protected override int DoFinal(byte[] output, int outOff, byte partialByte, int partialBits)
|
|
{
|
|
string algorithmName = this.AlgorithmName;
|
|
int num;
|
|
return num;
|
|
}
|
|
|
|
// Token: 0x06009FE7 RID: 40935 RVA: 0x002510B0 File Offset: 0x0024F2B0
|
|
[Token(Token = "0x6009FE7")]
|
|
[Address(RVA = "0x2250B40", Offset = "0x224F540", VA = "0x182250B40", Slot = "27")]
|
|
protected virtual int DoFinal(byte[] output, int outOff, int outLen, byte partialByte, int partialBits)
|
|
{
|
|
uint num;
|
|
byte[] array = new byte[] { (byte)num };
|
|
int num2 = 0;
|
|
uint num3;
|
|
base.Absorb(array, num2, (int)num3);
|
|
base.Squeeze(output, outOff, (long)outLen);
|
|
return outLen;
|
|
}
|
|
|
|
// Token: 0x06009FE8 RID: 40936 RVA: 0x002510F4 File Offset: 0x0024F2F4
|
|
[Token(Token = "0x6009FE8")]
|
|
[Address(RVA = "0x2250A50", Offset = "0x224F450", VA = "0x182250A50", Slot = "21")]
|
|
public override IMemoable Copy()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009FE8)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.ShakeDigest::Copy()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:ShakeDigest(var_0_06, newobj:ShakeDigest(ShakeDigest::.ctor, ldloc:ShakeDigest[exp:int32](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
|
|
*/;
|
|
}
|
|
}
|
|
}
|