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: 0x02001DD5 RID: 7637 [Token(Token = "0x2001DD5")] public class Sha1Digest : GeneralDigest { // Token: 0x0600BF37 RID: 48951 RVA: 0x002AFE50 File Offset: 0x002AE050 [Token(Token = "0x600BF37")] [Address(RVA = "0x290BE70", Offset = "0x290AE70", VA = "0x18290BE70")] public Sha1Digest() { uint[] array = new uint[80]; this.X = array; base..ctor(); IMemoable memoable = ((IMemoable)this).Copy(); } // Token: 0x0600BF38 RID: 48952 RVA: 0x002AFE7C File Offset: 0x002AE07C [Token(Token = "0x600BF38")] [Address(RVA = "0x290BE00", Offset = "0x290AE00", VA = "0x18290BE00")] public Sha1Digest(Sha1Digest t) { uint[] array = new uint[80]; this.X = array; base..ctor(t); this.CopyIn(t); } // Token: 0x0600BF39 RID: 48953 RVA: 0x002AFEA8 File Offset: 0x002AE0A8 [Token(Token = "0x600BF39")] [Address(RVA = "0x2902660", Offset = "0x2901660", VA = "0x182902660")] private void CopyIn(Sha1Digest t) { base.CopyIn(t); uint h = t.H1; this.H1 = h; uint h2 = t.H2; this.H2 = h2; uint h3 = t.H3; this.H3 = h3; uint h4 = t.H4; this.H4 = h4; uint h5 = t.H5; this.H5 = h5; uint[] x = t.X; int length = x.Length; int num = 0; uint[] x2 = this.X; int num2 = 0; Array.Copy(x, num2, x2, num, length); int num3 = t.xOff; this.xOff = num3; } // Token: 0x17001DBA RID: 7610 // (get) Token: 0x0600BF3A RID: 48954 RVA: 0x002AFF48 File Offset: 0x002AE148 [Token(Token = "0x17001DBA")] public override string AlgorithmName { [Token(Token = "0x600BF3A")] [Address(RVA = "0x290BED0", Offset = "0x290AED0", VA = "0x18290BED0", Slot = "17")] get { return "SHA-1"; } } // Token: 0x0600BF3B RID: 48955 RVA: 0x002AFF5C File Offset: 0x002AE15C [Token(Token = "0x600BF3B")] [Address(RVA = "0xC42C40", Offset = "0xC41C40", VA = "0x180C42C40", Slot = "18")] public override int GetDigestSize() { return 20; } // Token: 0x0600BF3C RID: 48956 RVA: 0x002AFF6C File Offset: 0x002AE16C [Token(Token = "0x600BF3C")] [Address(RVA = "0x290BC70", Offset = "0x290AC70", VA = "0x18290BC70", Slot = "14")] internal override void ProcessWord(byte[] input, int inOff) { uint[] x = this.X; int num = this.xOff; uint num2 = Pack.BE_To_UInt32(input, inOff); x[0] = num2; int num3 = this.xOff; num3++; this.xOff = num3; if (num3 == 16) { } } // Token: 0x0600BF3D RID: 48957 RVA: 0x002AFFB4 File Offset: 0x002AE1B4 [Token(Token = "0x600BF3D")] [Address(RVA = "0x290BBE0", Offset = "0x290ABE0", VA = "0x18290BBE0", Slot = "15")] internal override void ProcessLength(long bitLength) { if (this.xOff > 14) { } this.X[7] = (uint)bitLength; this.X[7] = (uint)bitLength; } // Token: 0x0600BF3E RID: 48958 RVA: 0x002AFFEC File Offset: 0x002AE1EC [Token(Token = "0x600BF3E")] [Address(RVA = "0x290B140", Offset = "0x290A140", VA = "0x18290B140", Slot = "19")] public override int DoFinal(byte[] output, int outOff) { base.Finish(); Pack.UInt32_To_BE(this.H1, output, outOff); Pack.UInt32_To_BE(this.H2, output, outOff); Pack.UInt32_To_BE(this.H3, output, outOff); Pack.UInt32_To_BE(this.H4, output, outOff); Pack.UInt32_To_BE(this.H5, output, outOff); return 20; } // Token: 0x0600BF3F RID: 48959 RVA: 0x002B0044 File Offset: 0x002AE244 [Token(Token = "0x600BF3F")] [Address(RVA = "0x290BD00", Offset = "0x290AD00", VA = "0x18290BD00", Slot = "13")] public override void Reset() { base.Reset(); uint[] x = this.X; this.H1 = (uint)((ulong)1732584193L); this.H2 = (uint)((ulong)4023233417L); this.H3 = (uint)((ulong)2562383102L); this.H4 = (uint)((ulong)271733878L); this.H5 = (uint)((ulong)3285377520L); this.xOff = (int)((ulong)0L); int length = x.Length; int num = 0; Array.Clear(x, num, length); } // Token: 0x0600BF40 RID: 48960 RVA: 0x002B00C8 File Offset: 0x002AE2C8 [Token(Token = "0x600BF40")] [Address(RVA = "0x101E210", Offset = "0x101D210", VA = "0x18101E210")] private static uint F(uint u, uint v, uint w) { return u; } // Token: 0x0600BF41 RID: 48961 RVA: 0x002B00D8 File Offset: 0x002AE2D8 [Token(Token = "0x600BF41")] [Address(RVA = "0x101E200", Offset = "0x101D200", VA = "0x18101E200")] private static uint H(uint u, uint v, uint w) { return u; } // Token: 0x0600BF42 RID: 48962 RVA: 0x002B00E8 File Offset: 0x002AE2E8 [Token(Token = "0x600BF42")] [Address(RVA = "0x290B1E0", Offset = "0x290A1E0", VA = "0x18290B1E0")] private static uint G(uint u, uint v, uint w) { return v; } // Token: 0x0600BF43 RID: 48963 RVA: 0x002B00F8 File Offset: 0x002AE2F8 [Token(Token = "0x600BF43")] [Address(RVA = "0x290B1F0", Offset = "0x290A1F0", VA = "0x18290B1F0", Slot = "16")] internal override void ProcessBlock() { uint[] x = this.X; int length = x.Length; uint num; num += (uint)1; uint num2; num2 += num2; x[0] = num2; uint num3 = this.H1; int num4 = 0; uint num5 = this.H2; uint num6 = this.H3; uint num7 = this.H4; uint num8 = this.H5; uint[] x2 = this.X; int length2 = x2.Length; num8 += (uint)1518500249; num3 = num6; num2 = num3; num5 += num2; num5 += num8; num2 = num5; num3 = num5; num2 += (uint)1518500249; num3 += num2; num3 += num7; num3 = num5; num2 = num3; num5 += (uint)1518500249; num8 = num5; num5 += num2; num5 += num6; num4 += 3; num7 = num3; num2 = num5; num3 = num5; num3 += num2; num8 += (uint)1518500249; num8 += num3; num6 = num5; num3 = num8; num2 = num8; num3 += num2; num4++; int length3 = x2.Length; num3 = num8; num7 += num8; num6 += num7; num4 += 2; num4 += 4; num4 += 3; ulong num9; num9 += (ulong)1L; int length4 = x2.Length; num4 += -1894007588; num4 += 4; num4 += 4; num4 += -1894007588; num4 += 1859775393; num4 += 4; num4 += -1894007588; num4 += num4; num4 += num4; num4 += 3; num4 += num4; num4 += -1894007588; ulong num10; num10 += (ulong)1L; int length5 = x2.Length; num4 += num4; num4 += num4; num4 += 2; num4 += -1894007588; num4 += 3; ulong num11; num11 += (ulong)1L; int num12 = 0; num3 += 2400959708U; Array.Clear(x2, num12, 16); } // Token: 0x0600BF44 RID: 48964 RVA: 0x002B030C File Offset: 0x002AE50C [Token(Token = "0x600BF44")] [Address(RVA = "0x290B0A0", Offset = "0x290A0A0", VA = "0x18290B0A0", Slot = "20")] public override IMemoable Copy() { /* An exception occurred when decompiling this method (0600BF44) ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Sha1Digest::Copy() ---> System.Exception: Basic block has to end with unconditional control flow. { Block_0: stloc:Sha1Digest(var_0_06, newobj:Sha1Digest(Sha1Digest::.ctor, ldloc:Sha1Digest(this))) stloc:uint32[](var_1_0E, newarr:uint32[]([mscorlib]System.UInt32, ldc.i4:int32(80))) stfld:uint32[](Sha1Digest::X, ldloc:Sha1Digest(var_0_06), ldloc:uint32[](var_1_0E)) call:void(Sha1Digest::CopyIn, ldloc:Sha1Digest(var_0_06), ldloc:Sha1Digest(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: 0x0600BF45 RID: 48965 RVA: 0x002B0338 File Offset: 0x002AE538 [Token(Token = "0x600BF45")] [Address(RVA = "0x290BD60", Offset = "0x290AD60", VA = "0x18290BD60", Slot = "21")] public override void Reset(IMemoable other) { do { if (other == 0) { } } while (other == 0); } // Token: 0x040078CB RID: 30923 [Token(Token = "0x40078CB")] private const int DigestLength = 20; // Token: 0x040078CC RID: 30924 [FieldOffset(Offset = "0x28")] [Token(Token = "0x40078CC")] private uint H1; // Token: 0x040078CD RID: 30925 [FieldOffset(Offset = "0x2C")] [Token(Token = "0x40078CD")] private uint H2; // Token: 0x040078CE RID: 30926 [FieldOffset(Offset = "0x30")] [Token(Token = "0x40078CE")] private uint H3; // Token: 0x040078CF RID: 30927 [FieldOffset(Offset = "0x34")] [Token(Token = "0x40078CF")] private uint H4; // Token: 0x040078D0 RID: 30928 [FieldOffset(Offset = "0x38")] [Token(Token = "0x40078D0")] private uint H5; // Token: 0x040078D1 RID: 30929 [FieldOffset(Offset = "0x40")] [Token(Token = "0x40078D1")] private uint[] X; // Token: 0x040078D2 RID: 30930 [FieldOffset(Offset = "0x48")] [Token(Token = "0x40078D2")] private int xOff; // Token: 0x040078D3 RID: 30931 [Token(Token = "0x40078D3")] private const uint Y1 = 1518500249U; // Token: 0x040078D4 RID: 30932 [Token(Token = "0x40078D4")] private const uint Y2 = 1859775393U; // Token: 0x040078D5 RID: 30933 [Token(Token = "0x40078D5")] private const uint Y3 = 2400959708U; // Token: 0x040078D6 RID: 30934 [Token(Token = "0x40078D6")] private const uint Y4 = 3395469782U; } }