using System; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities; using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests { // Token: 0x02001CF4 RID: 7412 [Token(Token = "0x2001CF4")] public class SM3Digest : GeneralDigest { // Token: 0x0600BB56 RID: 47958 RVA: 0x002A6FC8 File Offset: 0x002A51C8 [Token(Token = "0x600BB56")] [Address(RVA = "0x1FDE160", Offset = "0x1FDCF60", VA = "0x181FDE160")] 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: 0x0600BB57 RID: 47959 RVA: 0x002A701C File Offset: 0x002A521C [Token(Token = "0x600BB57")] [Address(RVA = "0x1FDE2A0", Offset = "0x1FDD0A0", VA = "0x181FDE2A0")] 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: 0x0600BB58 RID: 47960 RVA: 0x002A7064 File Offset: 0x002A5264 [Token(Token = "0x600BB58")] [Address(RVA = "0x1FDE330", Offset = "0x1FDD130", VA = "0x181FDE330")] 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: 0x0600BB59 RID: 47961 RVA: 0x002A70AC File Offset: 0x002A52AC [Token(Token = "0x600BB59")] [Address(RVA = "0x1FDD2F0", Offset = "0x1FDC0F0", VA = "0x181FDD2F0")] 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: 0x17001D1C RID: 7452 // (get) Token: 0x0600BB5A RID: 47962 RVA: 0x002A7124 File Offset: 0x002A5324 [Token(Token = "0x17001D1C")] public override string AlgorithmName { [Token(Token = "0x600BB5A")] [Address(RVA = "0x1FDE3C0", Offset = "0x1FDD1C0", VA = "0x181FDE3C0", Slot = "17")] get { return "SM3"; } } // Token: 0x0600BB5B RID: 47963 RVA: 0x002A7138 File Offset: 0x002A5338 [Token(Token = "0x600BB5B")] [Address(RVA = "0x55EA70", Offset = "0x55D870", VA = "0x18055EA70", Slot = "18")] public override int GetDigestSize() { return 32; } // Token: 0x0600BB5C RID: 47964 RVA: 0x002A7148 File Offset: 0x002A5348 [Token(Token = "0x600BB5C")] [Address(RVA = "0x1FDD370", Offset = "0x1FDC170", VA = "0x181FDD370", Slot = "20")] public override IMemoable Copy() { /* An exception occurred when decompiling this method (0600BB5C) 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 1660 */; } // Token: 0x0600BB5D RID: 47965 RVA: 0x002A7190 File Offset: 0x002A5390 [Token(Token = "0x600BB5D")] [Address(RVA = "0x1FDDF20", Offset = "0x1FDCD20", VA = "0x181FDDF20", Slot = "21")] public override void Reset(IMemoable other) { do { if (other == 0) { } } while (other == 0); } // Token: 0x0600BB5E RID: 47966 RVA: 0x002A71A8 File Offset: 0x002A53A8 [Token(Token = "0x600BB5E")] [Address(RVA = "0x1FDDFD0", Offset = "0x1FDCDD0", VA = "0x181FDDFD0", 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: 0x0600BB5F RID: 47967 RVA: 0x002A7208 File Offset: 0x002A5408 [Token(Token = "0x600BB5F")] [Address(RVA = "0x1FDD430", Offset = "0x1FDC230", VA = "0x181FDD430", Slot = "19")] public override int DoFinal(byte[] output, int outOff) { base.Finish(); Pack.UInt32_To_BE(this.V, output, outOff); return 32; } // Token: 0x0600BB60 RID: 47968 RVA: 0x002A722C File Offset: 0x002A542C [Token(Token = "0x600BB60")] [Address(RVA = "0x1FDDEB0", Offset = "0x1FDCCB0", VA = "0x181FDDEB0", Slot = "14")] internal override void ProcessWord(byte[] input, int inOff) { uint num = Pack.BE_To_UInt32(input, inOff); uint[] array = this.inwords; int num2 = this.xOff; array[0] = num; IMemoable memoable = ((IMemoable)this).Copy(); } // Token: 0x0600BB61 RID: 47969 RVA: 0x002A7268 File Offset: 0x002A5468 [Token(Token = "0x600BB61")] [Address(RVA = "0x1FDDD80", Offset = "0x1FDCB80", VA = "0x181FDDD80", 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: 0x0600BB62 RID: 47970 RVA: 0x002A7308 File Offset: 0x002A5508 [Token(Token = "0x600BB62")] [Address(RVA = "0x1FDD490", Offset = "0x1FDC290", VA = "0x181FDD490")] private uint P0(uint x) { return x; } // Token: 0x0600BB63 RID: 47971 RVA: 0x002A7318 File Offset: 0x002A5518 [Token(Token = "0x600BB63")] [Address(RVA = "0x1FDD4C0", Offset = "0x1FDC2C0", VA = "0x181FDD4C0")] private uint P1(uint x) { return x; } // Token: 0x0600BB64 RID: 47972 RVA: 0x002A7328 File Offset: 0x002A5528 [Token(Token = "0x600BB64")] [Address(RVA = "0x63B460", Offset = "0x63A260", VA = "0x18063B460")] private uint FF0(uint x, uint y, uint z) { return x; } // Token: 0x0600BB65 RID: 47973 RVA: 0x002A7338 File Offset: 0x002A5538 [Token(Token = "0x600BB65")] [Address(RVA = "0x63B400", Offset = "0x63A200", VA = "0x18063B400")] private uint FF1(uint x, uint y, uint z) { return y; } // Token: 0x0600BB66 RID: 47974 RVA: 0x002A7348 File Offset: 0x002A5548 [Token(Token = "0x600BB66")] [Address(RVA = "0x63B460", Offset = "0x63A260", VA = "0x18063B460")] private uint GG0(uint x, uint y, uint z) { return x; } // Token: 0x0600BB67 RID: 47975 RVA: 0x002A7358 File Offset: 0x002A5558 [Token(Token = "0x600BB67")] [Address(RVA = "0x63B3A0", Offset = "0x63A1A0", VA = "0x18063B3A0")] private uint GG1(uint x, uint y, uint z) { return x; } // Token: 0x0600BB68 RID: 47976 RVA: 0x002A7368 File Offset: 0x002A5568 [Token(Token = "0x600BB68")] [Address(RVA = "0x1FDD4F0", Offset = "0x1FDC2F0", VA = "0x181FDD4F0", 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: 0x0400770B RID: 30475 [Token(Token = "0x400770B")] private const int DIGEST_LENGTH = 32; // Token: 0x0400770C RID: 30476 [Token(Token = "0x400770C")] private const int BLOCK_SIZE = 16; // Token: 0x0400770D RID: 30477 [FieldOffset(Offset = "0x28")] [Token(Token = "0x400770D")] private uint[] V; // Token: 0x0400770E RID: 30478 [FieldOffset(Offset = "0x30")] [Token(Token = "0x400770E")] private uint[] inwords; // Token: 0x0400770F RID: 30479 [FieldOffset(Offset = "0x38")] [Token(Token = "0x400770F")] private int xOff; // Token: 0x04007710 RID: 30480 [FieldOffset(Offset = "0x40")] [Token(Token = "0x4007710")] private uint[] W; // Token: 0x04007711 RID: 30481 [Token(Token = "0x4007711")] private static readonly uint[] T; } }