Files
2026-04-10 22:50:51 +02:00

362 lines
12 KiB
C#

using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Rfc8032;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
{
// Token: 0x02001CEC RID: 7404
[Token(Token = "0x2001CEC")]
public class MD5Digest : GeneralDigest
{
// Token: 0x0600BAD2 RID: 47826 RVA: 0x002A31A0 File Offset: 0x002A13A0
[Token(Token = "0x600BAD2")]
[Address(RVA = "0x1B45D20", Offset = "0x1B44B20", VA = "0x181B45D20")]
public MD5Digest()
{
uint[] array = new uint[16];
this.X = array;
base..ctor();
byte[] array2 = new byte[4];
this.xBuf = array2;
IMemoable memoable = ((IMemoable)this).Copy();
}
// Token: 0x0600BAD3 RID: 47827 RVA: 0x002A31D8 File Offset: 0x002A13D8
[Token(Token = "0x600BAD3")]
[Address(RVA = "0x1B45DB0", Offset = "0x1B44BB0", VA = "0x181B45DB0")]
public MD5Digest(MD5Digest t)
{
uint[] array = new uint[16];
this.X = array;
base..ctor(t);
this.CopyIn(t);
}
// Token: 0x0600BAD4 RID: 47828 RVA: 0x002A3204 File Offset: 0x002A1404
[Token(Token = "0x600BAD4")]
[Address(RVA = "0x1B43550", Offset = "0x1B42350", VA = "0x181B43550")]
private void CopyIn(MD5Digest t)
{
byte[] xBuf = t.xBuf;
int length = xBuf.Length;
int num = 0;
byte[] xBuf2 = this.xBuf;
int num2 = 0;
Array.Copy(xBuf, num2, xBuf2, num, length);
int xBufOff = t.xBufOff;
this.xBufOff = xBufOff;
long byteCount = t.byteCount;
this.byteCount = byteCount;
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[] x = t.X;
int length2 = x.Length;
int num3 = 0;
uint[] x2 = this.X;
int num4 = 0;
Array.Copy(x, num4, x2, num3, length2);
int num5 = t.xOff;
this.xOff = num5;
}
// Token: 0x17001D14 RID: 7444
// (get) Token: 0x0600BAD5 RID: 47829 RVA: 0x002A32DC File Offset: 0x002A14DC
[Token(Token = "0x17001D14")]
public override string AlgorithmName
{
[Token(Token = "0x600BAD5")]
[Address(RVA = "0x1B45E20", Offset = "0x1B44C20", VA = "0x181B45E20", Slot = "17")]
get
{
return "MD5";
}
}
// Token: 0x0600BAD6 RID: 47830 RVA: 0x002A32F0 File Offset: 0x002A14F0
[Token(Token = "0x600BAD6")]
[Address(RVA = "0x4B6B10", Offset = "0x4B5910", VA = "0x1804B6B10", Slot = "18")]
public override int GetDigestSize()
{
return 16;
}
// Token: 0x0600BAD7 RID: 47831 RVA: 0x002A3300 File Offset: 0x002A1500
[Token(Token = "0x600BAD7")]
[Address(RVA = "0x1B45A50", Offset = "0x1B44850", VA = "0x181B45A50", Slot = "14")]
internal override void ProcessWord(byte[] input, int inOff)
{
uint[] x = this.X;
int num = this.xOff;
x[0] = (uint)inOff;
int num2 = this.xOff;
num2++;
this.xOff = num2;
if (num2 == 16)
{
}
}
// Token: 0x0600BAD8 RID: 47832 RVA: 0x002A3340 File Offset: 0x002A1540
[Token(Token = "0x600BAD8")]
[Address(RVA = "0x1B45960", Offset = "0x1B44760", VA = "0x181B45960", Slot = "15")]
internal override void ProcessLength(long bitLength)
{
int num = this.xOff;
int num2 = 0;
if (num > 14 && num == 15)
{
this.X[7] = (uint)num2;
}
int num3 = this.xOff;
if (num3 < 14)
{
uint[] x = this.X;
num3++;
x[0] = (uint)num2;
}
this.X[7] = (uint)bitLength;
this.X[7] = (uint)bitLength;
}
// Token: 0x0600BAD9 RID: 47833 RVA: 0x002A33B0 File Offset: 0x002A15B0
[Token(Token = "0x600BAD9")]
[Address(RVA = "0x1B44840", Offset = "0x1B43640", VA = "0x181B44840", Slot = "19")]
public override int DoFinal(byte[] output, int outOff)
{
base.Finish();
Ed25519.Encode32(this.H1, output, outOff);
Ed25519.Encode32(this.H2, output, outOff);
Ed25519.Encode32(this.H3, output, outOff);
Ed25519.Encode32(this.H4, output, outOff);
return 16;
}
// Token: 0x0600BADA RID: 47834 RVA: 0x002A33FC File Offset: 0x002A15FC
[Token(Token = "0x600BADA")]
[Address(RVA = "0x1B44460", Offset = "0x1B43260", VA = "0x181B44460", Slot = "13")]
public override void Reset()
{
int num = 0;
this.byteCount = (long)num;
this.xBufOff = num;
byte[] xBuf = this.xBuf;
int length = xBuf.Length;
int num2 = 0;
Array.Clear(xBuf, num2, length);
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.xOff = num;
if (num != x.Length)
{
num++;
x[0] = (uint)num;
uint[] x2 = this.X;
}
}
// Token: 0x0600BADB RID: 47835 RVA: 0x002A34A0 File Offset: 0x002A16A0
[Token(Token = "0x600BADB")]
[Address(RVA = "0x1B45B80", Offset = "0x1B44980", VA = "0x181B45B80")]
private static uint RotateLeft(uint x, int n)
{
return x;
}
// Token: 0x0600BADC RID: 47836 RVA: 0x002A34B0 File Offset: 0x002A16B0
[Token(Token = "0x600BADC")]
[Address(RVA = "0x1B448D0", Offset = "0x1B436D0", VA = "0x181B448D0")]
private static uint F(uint u, uint v, uint w)
{
return u;
}
// Token: 0x0600BADD RID: 47837 RVA: 0x002A34C0 File Offset: 0x002A16C0
[Token(Token = "0x600BADD")]
[Address(RVA = "0x1B448E0", Offset = "0x1B436E0", VA = "0x181B448E0")]
private static uint G(uint u, uint v, uint w)
{
return w;
}
// Token: 0x0600BADE RID: 47838 RVA: 0x002A34D0 File Offset: 0x002A16D0
[Token(Token = "0x600BADE")]
[Address(RVA = "0x1B448F0", Offset = "0x1B436F0", VA = "0x181B448F0")]
private static uint H(uint u, uint v, uint w)
{
return u;
}
// Token: 0x0600BADF RID: 47839 RVA: 0x002A34E0 File Offset: 0x002A16E0
[Token(Token = "0x600BADF")]
[Address(RVA = "0x1B44900", Offset = "0x1B43700", VA = "0x181B44900")]
private static uint K(uint u, uint v, uint w)
{
return w;
}
// Token: 0x0600BAE0 RID: 47840 RVA: 0x002A34F0 File Offset: 0x002A16F0
[Token(Token = "0x600BAE0")]
[Address(RVA = "0x1B44910", Offset = "0x1B43710", VA = "0x181B44910", Slot = "16")]
internal override void ProcessBlock()
{
uint h = this.H2;
uint[] x = this.X;
int length = x.Length;
int num = MD5Digest.S21;
uint num2 = x[7];
num += -2022574463;
}
// Token: 0x0600BAE1 RID: 47841 RVA: 0x002A3530 File Offset: 0x002A1730
[Token(Token = "0x600BAE1")]
[Address(RVA = "0x1B447A0", Offset = "0x1B435A0", VA = "0x181B447A0", Slot = "20")]
public override IMemoable Copy()
{
/*
An exception occurred when decompiling this method (0600BAE1)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.MD5Digest::Copy()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:MD5Digest(var_0_06, newobj:MD5Digest(MD5Digest::.ctor, ldloc:MD5Digest(this)))
stloc:uint32[](var_1_0E, newarr:uint32[]([mscorlib]System.UInt32, ldc.i4:int32(16)))
stfld:uint32[](MD5Digest::X, ldloc:MD5Digest(var_0_06), ldloc:uint32[](var_1_0E))
call:void(MD5Digest::CopyIn, ldloc:MD5Digest(var_0_06), ldloc:MD5Digest(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: 0x0600BAE2 RID: 47842 RVA: 0x002A355C File Offset: 0x002A175C
[Token(Token = "0x600BAE2")]
[Address(RVA = "0x1B45AE0", Offset = "0x1B448E0", VA = "0x181B45AE0", Slot = "21")]
public override void Reset(IMemoable other)
{
do
{
if (other == 0)
{
}
}
while (other == 0);
}
// Token: 0x040076CB RID: 30411
[Token(Token = "0x40076CB")]
private const int DigestLength = 16;
// Token: 0x040076CC RID: 30412
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40076CC")]
private uint H1;
// Token: 0x040076CD RID: 30413
[FieldOffset(Offset = "0x2C")]
[Token(Token = "0x40076CD")]
private uint H2;
// Token: 0x040076CE RID: 30414
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40076CE")]
private uint H3;
// Token: 0x040076CF RID: 30415
[FieldOffset(Offset = "0x34")]
[Token(Token = "0x40076CF")]
private uint H4;
// Token: 0x040076D0 RID: 30416
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40076D0")]
private uint[] X;
// Token: 0x040076D1 RID: 30417
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x40076D1")]
private int xOff;
// Token: 0x040076D2 RID: 30418
[Token(Token = "0x40076D2")]
private static readonly int S11;
// Token: 0x040076D3 RID: 30419
[Token(Token = "0x40076D3")]
private static readonly int S12;
// Token: 0x040076D4 RID: 30420
[Token(Token = "0x40076D4")]
private static readonly int S13;
// Token: 0x040076D5 RID: 30421
[Token(Token = "0x40076D5")]
private static readonly int S14;
// Token: 0x040076D6 RID: 30422
[Token(Token = "0x40076D6")]
private static readonly int S21;
// Token: 0x040076D7 RID: 30423
[Token(Token = "0x40076D7")]
private static readonly int S22;
// Token: 0x040076D8 RID: 30424
[Token(Token = "0x40076D8")]
private static readonly int S23;
// Token: 0x040076D9 RID: 30425
[Token(Token = "0x40076D9")]
private static readonly int S24;
// Token: 0x040076DA RID: 30426
[Token(Token = "0x40076DA")]
private static readonly int S31;
// Token: 0x040076DB RID: 30427
[Token(Token = "0x40076DB")]
private static readonly int S32;
// Token: 0x040076DC RID: 30428
[Token(Token = "0x40076DC")]
private static readonly int S33;
// Token: 0x040076DD RID: 30429
[Token(Token = "0x40076DD")]
private static readonly int S34;
// Token: 0x040076DE RID: 30430
[Token(Token = "0x40076DE")]
private static readonly int S41;
// Token: 0x040076DF RID: 30431
[Token(Token = "0x40076DF")]
private static readonly int S42;
// Token: 0x040076E0 RID: 30432
[Token(Token = "0x40076E0")]
private static readonly int S43;
// Token: 0x040076E1 RID: 30433
[Token(Token = "0x40076E1")]
private static readonly int S44;
}
}