This commit is contained in:
niko
2026-04-08 23:40:05 +02:00
parent d6894bcbc7
commit 18dc73f922
7750 changed files with 1795369 additions and 0 deletions
@@ -0,0 +1,379 @@
using System;
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: 0x02001717 RID: 5911
[Token(Token = "0x2001717")]
[StructLayout(3)]
public class SM3Digest : GeneralDigest
{
// Token: 0x06009F7C RID: 40828 RVA: 0x0024EEF8 File Offset: 0x0024D0F8
[Token(Token = "0x6009F7C")]
[Address(RVA = "0x224C1F0", Offset = "0x224ABF0", VA = "0x18224C1F0")]
static SM3Digest()
{
uint[] array = new uint[64];
int num = 0;
SM3Digest.T = array;
uint[] t = SM3Digest.T;
num++;
t[0] = (uint)2043430169;
if (32UL < (ulong)16L)
{
}
SM3Digest.T[0] = (uint)2055708042;
}
// Token: 0x06009F7D RID: 40829 RVA: 0x0024EF4C File Offset: 0x0024D14C
[Token(Token = "0x6009F7D")]
[Address(RVA = "0x224C330", Offset = "0x224AD30", VA = "0x18224C330")]
public SM3Digest()
{
uint[] array = new uint[8];
this.V = array;
uint[] array2 = new uint[16];
this.inwords = array2;
uint[] array3 = new uint[68];
this.W = array3;
base..ctor();
IMemoable memoable = ((IMemoable)this).Copy();
}
// Token: 0x06009F7E RID: 40830 RVA: 0x0024EF94 File Offset: 0x0024D194
[Token(Token = "0x6009F7E")]
[Address(RVA = "0x224C3C0", Offset = "0x224ADC0", VA = "0x18224C3C0")]
public SM3Digest(SM3Digest t)
{
uint[] array = new uint[8];
this.V = array;
uint[] array2 = new uint[16];
this.inwords = array2;
uint[] array3 = new uint[68];
this.W = array3;
base..ctor(t);
this.CopyIn(t);
}
// Token: 0x06009F7F RID: 40831 RVA: 0x0024EFDC File Offset: 0x0024D1DC
[Token(Token = "0x6009F7F")]
[Address(RVA = "0x224B380", Offset = "0x2249D80", VA = "0x18224B380")]
private void CopyIn(SM3Digest t)
{
uint[] v = this.V;
int length = v.Length;
int num = 0;
uint[] v2 = t.V;
int num2 = 0;
Array.Copy(v2, num2, v, num, length);
uint[] array = this.inwords;
int length2 = array.Length;
int num3 = 0;
uint[] array2 = t.inwords;
int num4 = 0;
Array.Copy(array2, num4, array, num3, length2);
int num5 = t.xOff;
this.xOff = num5;
}
// Token: 0x1700191B RID: 6427
// (get) Token: 0x06009F80 RID: 40832 RVA: 0x0024F054 File Offset: 0x0024D254
[Token(Token = "0x1700191B")]
public override string AlgorithmName
{
[Token(Token = "0x6009F80")]
[Address(RVA = "0x224C450", Offset = "0x224AE50", VA = "0x18224C450", Slot = "17")]
get
{
return "SM3";
}
}
// Token: 0x06009F81 RID: 40833 RVA: 0x0024F068 File Offset: 0x0024D268
[Token(Token = "0x6009F81")]
[Address(RVA = "0xC390D0", Offset = "0xC37AD0", VA = "0x180C390D0", Slot = "18")]
public override int GetDigestSize()
{
return 32;
}
// Token: 0x06009F82 RID: 40834 RVA: 0x0024F078 File Offset: 0x0024D278
[Token(Token = "0x6009F82")]
[Address(RVA = "0x224B400", Offset = "0x2249E00", VA = "0x18224B400", Slot = "20")]
public override IMemoable Copy()
{
/*
An exception occurred when decompiling this method (06009F82)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.SM3Digest::Copy()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:SM3Digest(var_0_06, newobj:SM3Digest(SM3Digest::.ctor, ldloc:SM3Digest(this)))
stloc:uint32[](var_1_0D, newarr:uint32[]([mscorlib]System.UInt32, ldc.i4:int32(8)))
stfld:uint32[](SM3Digest::V, ldloc:SM3Digest(var_0_06), ldloc:uint32[](var_1_0D))
stloc:uint32[](var_2_1C, newarr:uint32[]([mscorlib]System.UInt32, ldc.i4:int32(16)))
stfld:uint32[](SM3Digest::inwords, ldloc:SM3Digest(var_0_06), ldloc:uint32[](var_2_1C))
stloc:uint32[](var_3_2B, newarr:uint32[]([mscorlib]System.UInt32, ldc.i4:int32(68)))
stfld:uint32[](SM3Digest::W, ldloc:SM3Digest(var_0_06), ldloc:uint32[](var_3_2B))
call:void(SM3Digest::CopyIn, ldloc:SM3Digest(var_0_06), ldloc:SM3Digest(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: 0x06009F83 RID: 40835 RVA: 0x0024F0C0 File Offset: 0x0024D2C0
[Token(Token = "0x6009F83")]
[Address(RVA = "0x224BFB0", Offset = "0x224A9B0", VA = "0x18224BFB0", Slot = "21")]
public override void Reset(IMemoable other)
{
do
{
if (other == 0)
{
}
}
while (other == 0);
}
// Token: 0x06009F84 RID: 40836 RVA: 0x0024F0D8 File Offset: 0x0024D2D8
[Token(Token = "0x6009F84")]
[Address(RVA = "0x224C060", Offset = "0x224AA60", VA = "0x18224C060", Slot = "13")]
public override void Reset()
{
base.Reset();
uint[] v = this.V;
uint[] v2 = this.V;
uint[] v3 = this.V;
uint[] v4 = this.V;
uint[] v5 = this.V;
uint[] v6 = this.V;
uint[] v7 = this.V;
uint[] v8 = this.V;
this.xOff = (int)((ulong)0L);
}
// Token: 0x06009F85 RID: 40837 RVA: 0x0024F138 File Offset: 0x0024D338
[Token(Token = "0x6009F85")]
[Address(RVA = "0x224B4C0", Offset = "0x2249EC0", VA = "0x18224B4C0", Slot = "19")]
public override int DoFinal(byte[] output, int outOff)
{
base.Finish();
Pack.UInt32_To_BE(this.V, output, outOff);
return 32;
}
// Token: 0x06009F86 RID: 40838 RVA: 0x0024F15C File Offset: 0x0024D35C
[Token(Token = "0x6009F86")]
[Address(RVA = "0x224BF40", Offset = "0x224A940", VA = "0x18224BF40", Slot = "14")]
internal override void ProcessWord(byte[] input, int inOff)
{
uint[] array = this.inwords;
int num = this.xOff;
array[0] = (uint)inOff;
IMemoable memoable = ((IMemoable)this).Copy();
}
// Token: 0x06009F87 RID: 40839 RVA: 0x0024F190 File Offset: 0x0024D390
[Token(Token = "0x6009F87")]
[Address(RVA = "0x224BE10", Offset = "0x224A810", VA = "0x18224BE10", Slot = "15")]
internal override void ProcessLength(long bitLength)
{
int num;
int num2;
do
{
num = this.xOff;
num2 = 0;
}
while (num <= 14);
this.inwords[0] = (uint)num2;
int num3;
if (this.xOff < 14)
{
this.inwords[0] = (uint)num2;
num3 = this.xOff;
num3++;
this.xOff = num3;
}
uint[] array = this.inwords;
int num4 = num3 + 1;
this.xOff = num4;
array[0] = (uint)bitLength;
int num5 = this.xOff;
uint[] array2 = this.inwords;
int num6 = num5 + 1;
this.xOff = num6;
array2[0] = (uint)bitLength;
}
// Token: 0x06009F88 RID: 40840 RVA: 0x0024F230 File Offset: 0x0024D430
[Token(Token = "0x6009F88")]
[Address(RVA = "0x224B520", Offset = "0x2249F20", VA = "0x18224B520")]
private uint P0(uint x)
{
return x;
}
// Token: 0x06009F89 RID: 40841 RVA: 0x0024F240 File Offset: 0x0024D440
[Token(Token = "0x6009F89")]
[Address(RVA = "0x224B550", Offset = "0x2249F50", VA = "0x18224B550")]
private uint P1(uint x)
{
return x;
}
// Token: 0x06009F8A RID: 40842 RVA: 0x0024F250 File Offset: 0x0024D450
[Token(Token = "0x6009F8A")]
[Address(RVA = "0xB6B830", Offset = "0xB6A230", VA = "0x180B6B830")]
private uint FF0(uint x, uint y, uint z)
{
return x;
}
// Token: 0x06009F8B RID: 40843 RVA: 0x0024F260 File Offset: 0x0024D460
[Token(Token = "0x6009F8B")]
[Address(RVA = "0xB6B7D0", Offset = "0xB6A1D0", VA = "0x180B6B7D0")]
private uint FF1(uint x, uint y, uint z)
{
return y;
}
// Token: 0x06009F8C RID: 40844 RVA: 0x0024F270 File Offset: 0x0024D470
[Token(Token = "0x6009F8C")]
[Address(RVA = "0xB6B830", Offset = "0xB6A230", VA = "0x180B6B830")]
private uint GG0(uint x, uint y, uint z)
{
return x;
}
// Token: 0x06009F8D RID: 40845 RVA: 0x0024F280 File Offset: 0x0024D480
[Token(Token = "0x6009F8D")]
[Address(RVA = "0xB6B770", Offset = "0xB6A170", VA = "0x180B6B770")]
private uint GG1(uint x, uint y, uint z)
{
return x;
}
// Token: 0x06009F8E RID: 40846 RVA: 0x0024F290 File Offset: 0x0024D490
[Token(Token = "0x6009F8E")]
[Address(RVA = "0x224B580", Offset = "0x2249F80", VA = "0x18224B580", Slot = "16")]
internal override void ProcessBlock()
{
int num = 0;
uint[] array = this.inwords;
uint[] w = this.W;
uint num2 = array[num];
num++;
w[0] = num2;
uint[] w2 = this.W;
int length = w2.Length;
uint num3 = w2[w];
uint num4;
num4 += (uint)1;
w2[0] = num3;
uint[] v = this.V;
int length2 = v.Length;
uint num5 = v[0];
uint num6 = v[0];
uint num7 = v[1];
uint num8 = v[1];
uint num9 = v[2];
uint num10 = v[2];
uint num11 = v[3];
uint num12 = v[3];
int num13 = 0;
num12 = num5;
uint[] t = SM3Digest.T;
uint num14;
num14 += num5;
num14 += num9;
uint[] w3 = this.W;
int length3 = w3.Length;
num13 += 4;
num7 += num8;
num6 = num11;
num6 += num12;
uint num15;
num6 += num15;
num6 += num14;
num13++;
num5 = num14;
uint num16 = w3[num13];
num7 += num16;
num5 += num7;
num7 = num10;
num9 = num6;
uint[] t2 = SM3Digest.T;
uint[] w4 = this.W;
uint num17;
num17 += num5;
num17 += num9;
num14 = num17;
int length4 = w4.Length;
num6 = num5;
num5 = num9;
uint num18 = w4[t2];
num18 += num7;
num18 += num6;
num5 += num18;
num5 += num11;
uint num19;
num5 += num19;
num5 += num14;
num4 += (uint)1;
uint[] v2 = this.V;
uint[] v3 = this.V;
uint[] v4 = this.V;
uint[] v5 = this.V;
uint[] v6 = this.V;
uint[] v7 = this.V;
uint[] v8 = this.V;
uint[] v9 = this.V;
this.xOff = (int)((ulong)0L);
}
// Token: 0x040068C8 RID: 26824
[Token(Token = "0x40068C8")]
private const int DIGEST_LENGTH = 32;
// Token: 0x040068C9 RID: 26825
[Token(Token = "0x40068C9")]
private const int BLOCK_SIZE = 16;
// Token: 0x040068CA RID: 26826
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x40068CA")]
private uint[] V;
// Token: 0x040068CB RID: 26827
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x40068CB")]
private uint[] inwords;
// Token: 0x040068CC RID: 26828
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x40068CC")]
private int xOff;
// Token: 0x040068CD RID: 26829
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x40068CD")]
private uint[] W;
// Token: 0x040068CE RID: 26830
[Token(Token = "0x40068CE")]
private static readonly uint[] T;
}
}