Files
Apr2020-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Crypto/Digests/ShakeDigest.cs
T
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

179 lines
12 KiB
C#

using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
{
// Token: 0x02001CFB RID: 7419
[Token(Token = "0x2001CFB")]
public class ShakeDigest : KeccakDigest, IXof, IDigest
{
// Token: 0x0600BBB8 RID: 48056 RVA: 0x002A9090 File Offset: 0x002A7290
[Token(Token = "0x600BBB8")]
[Address(RVA = "0x1FE2930", Offset = "0x1FE1730", VA = "0x181FE2930")]
private static int CheckBitLength(int bitLength)
{
/*
An exception occurred when decompiling this method (0600BBB8)
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 1660
*/;
}
// Token: 0x0600BBB9 RID: 48057 RVA: 0x002A90BC File Offset: 0x002A72BC
[Token(Token = "0x600BBB9")]
[Address(RVA = "0x1FE2EE0", Offset = "0x1FE1CE0", VA = "0x181FE2EE0")]
public ShakeDigest()
: base(128)
{
}
// Token: 0x0600BBBA RID: 48058 RVA: 0x002A90D4 File Offset: 0x002A72D4
[Token(Token = "0x600BBBA")]
[Address(RVA = "0x1FE2D80", Offset = "0x1FE1B80", VA = "0x181FE2D80")]
public ShakeDigest(int bitLength)
{
/*
An exception occurred when decompiling this method (0600BBBA)
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 1660
*/;
}
// Token: 0x0600BBBB RID: 48059 RVA: 0x002A9104 File Offset: 0x002A7304
[Token(Token = "0x600BBBB")]
[Address(RVA = "0x1FE2E70", Offset = "0x1FE1C70", VA = "0x181FE2E70")]
public ShakeDigest(ShakeDigest source)
: base(source)
{
}
// Token: 0x17001D23 RID: 7459
// (get) Token: 0x0600BBBC RID: 48060 RVA: 0x002A9118 File Offset: 0x002A7318
[Token(Token = "0x17001D23")]
public override string AlgorithmName
{
[Token(Token = "0x600BBBC")]
[Address(RVA = "0x1FE2F60", Offset = "0x1FE1D60", VA = "0x181FE2F60", Slot = "13")]
get
{
int fixedOutputLength = this.fixedOutputLength;
return "SHAKE" + fixedOutputLength;
}
}
// Token: 0x0600BBBD RID: 48061 RVA: 0x002A9138 File Offset: 0x002A7338
[Token(Token = "0x600BBBD")]
[Address(RVA = "0x1FE2A70", Offset = "0x1FE1870", VA = "0x181FE2A70", Slot = "17")]
public override int DoFinal(byte[] output, int outOff)
{
string algorithmName = this.AlgorithmName;
int num;
return num;
}
// Token: 0x0600BBBE RID: 48062 RVA: 0x002A9150 File Offset: 0x002A7350
[Token(Token = "0x600BBBE")]
[Address(RVA = "0x1FE2C40", Offset = "0x1FE1A40", VA = "0x181FE2C40", Slot = "25")]
public virtual int DoFinal(byte[] output, int outOff, int outLen)
{
int num = this.DoFinal(output, outOff, outLen);
return outLen;
}
// Token: 0x0600BBBF RID: 48063 RVA: 0x002A9168 File Offset: 0x002A7368
[Token(Token = "0x600BBBF")]
[Address(RVA = "0x1FE2D10", Offset = "0x1FE1B10", VA = "0x181FE2D10", 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: 0x0600BBC0 RID: 48064 RVA: 0x002A9188 File Offset: 0x002A7388
[Token(Token = "0x600BBC0")]
[Address(RVA = "0x1FE2C90", Offset = "0x1FE1A90", VA = "0x181FE2C90", Slot = "18")]
protected override int DoFinal(byte[] output, int outOff, byte partialByte, int partialBits)
{
string algorithmName = this.AlgorithmName;
int num;
return num;
}
// Token: 0x0600BBC1 RID: 48065 RVA: 0x002A91A0 File Offset: 0x002A73A0
[Token(Token = "0x600BBC1")]
[Address(RVA = "0x1FE2AD0", Offset = "0x1FE18D0", VA = "0x181FE2AD0", 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: 0x0600BBC2 RID: 48066 RVA: 0x002A91E4 File Offset: 0x002A73E4
[Token(Token = "0x600BBC2")]
[Address(RVA = "0x1FE29E0", Offset = "0x1FE17E0", VA = "0x181FE29E0", Slot = "21")]
public override IMemoable Copy()
{
/*
An exception occurred when decompiling this method (0600BBC2)
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 1660
*/;
}
}
}