426 lines
13 KiB
C#
426 lines
13 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
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: 0x02001719 RID: 5913
|
|
[Token(Token = "0x2001719")]
|
|
[StructLayout(3)]
|
|
public class Sha224Digest : GeneralDigest
|
|
{
|
|
// Token: 0x06009F9E RID: 40862 RVA: 0x0024F9B8 File Offset: 0x0024DBB8
|
|
[Token(Token = "0x6009F9E")]
|
|
[Address(RVA = "0x224E260", Offset = "0x224CC60", VA = "0x18224E260")]
|
|
public Sha224Digest()
|
|
{
|
|
uint[] array = new uint[64];
|
|
this.X = array;
|
|
base..ctor();
|
|
IMemoable memoable = ((IMemoable)this).Copy();
|
|
}
|
|
|
|
// Token: 0x06009F9F RID: 40863 RVA: 0x0024F9E4 File Offset: 0x0024DBE4
|
|
[Token(Token = "0x6009F9F")]
|
|
[Address(RVA = "0x224E1F0", Offset = "0x224CBF0", VA = "0x18224E1F0")]
|
|
public Sha224Digest(Sha224Digest t)
|
|
{
|
|
uint[] array = new uint[64];
|
|
this.X = array;
|
|
base..ctor(t);
|
|
this.CopyIn(t);
|
|
}
|
|
|
|
// Token: 0x06009FA0 RID: 40864 RVA: 0x0024FA10 File Offset: 0x0024DC10
|
|
[Token(Token = "0x6009FA0")]
|
|
[Address(RVA = "0x22465F0", Offset = "0x2244FF0", VA = "0x1822465F0")]
|
|
private void CopyIn(Sha224Digest 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 h6 = t.H6;
|
|
this.H6 = h6;
|
|
uint h7 = t.H7;
|
|
this.H7 = h7;
|
|
uint h8 = t.H8;
|
|
this.H8 = h8;
|
|
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: 0x1700191D RID: 6429
|
|
// (get) Token: 0x06009FA1 RID: 40865 RVA: 0x0024FAE0 File Offset: 0x0024DCE0
|
|
[Token(Token = "0x1700191D")]
|
|
public override string AlgorithmName
|
|
{
|
|
[Token(Token = "0x6009FA1")]
|
|
[Address(RVA = "0x224E2C0", Offset = "0x224CCC0", VA = "0x18224E2C0", Slot = "17")]
|
|
get
|
|
{
|
|
return "SHA-224";
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009FA2 RID: 40866 RVA: 0x0024FAF4 File Offset: 0x0024DCF4
|
|
[Token(Token = "0x6009FA2")]
|
|
[Address(RVA = "0x1BE9190", Offset = "0x1BE7B90", VA = "0x181BE9190", Slot = "18")]
|
|
public override int GetDigestSize()
|
|
{
|
|
return 28;
|
|
}
|
|
|
|
// Token: 0x06009FA3 RID: 40867 RVA: 0x0024FB04 File Offset: 0x0024DD04
|
|
[Token(Token = "0x6009FA3")]
|
|
[Address(RVA = "0x224DF60", Offset = "0x224C960", VA = "0x18224DF60", 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: 0x06009FA4 RID: 40868 RVA: 0x0024FB44 File Offset: 0x0024DD44
|
|
[Token(Token = "0x6009FA4")]
|
|
[Address(RVA = "0x224DED0", Offset = "0x224C8D0", VA = "0x18224DED0", Slot = "15")]
|
|
internal override void ProcessLength(long bitLength)
|
|
{
|
|
if (this.xOff > 14)
|
|
{
|
|
}
|
|
this.X[7] = (uint)bitLength;
|
|
this.X[7] = (uint)bitLength;
|
|
}
|
|
|
|
// Token: 0x06009FA5 RID: 40869 RVA: 0x0024FB7C File Offset: 0x0024DD7C
|
|
[Token(Token = "0x6009FA5")]
|
|
[Address(RVA = "0x224D380", Offset = "0x224BD80", VA = "0x18224D380", 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);
|
|
Pack.UInt32_To_BE(this.H6, output, outOff);
|
|
Pack.UInt32_To_BE(this.H7, output, outOff);
|
|
return 28;
|
|
}
|
|
|
|
// Token: 0x06009FA6 RID: 40870 RVA: 0x0024FBEC File Offset: 0x0024DDEC
|
|
[Token(Token = "0x6009FA6")]
|
|
[Address(RVA = "0x224E090", Offset = "0x224CA90", VA = "0x18224E090", Slot = "13")]
|
|
public override void Reset()
|
|
{
|
|
base.Reset();
|
|
uint[] x = this.X;
|
|
this.H1 = (uint)((ulong)3238371032L);
|
|
this.H2 = (uint)((ulong)914150663L);
|
|
this.H3 = (uint)((ulong)812702999L);
|
|
this.H4 = (uint)((ulong)4144912697L);
|
|
this.H5 = (uint)((ulong)4290775857L);
|
|
this.H6 = (uint)((ulong)1750603025L);
|
|
this.H7 = (uint)((ulong)1694076839L);
|
|
this.H8 = (uint)((ulong)3204075428L);
|
|
this.xOff = (int)((ulong)0L);
|
|
int length = x.Length;
|
|
int num = 0;
|
|
Array.Clear(x, num, length);
|
|
}
|
|
|
|
// Token: 0x06009FA7 RID: 40871 RVA: 0x0024FC9C File Offset: 0x0024DE9C
|
|
[Token(Token = "0x6009FA7")]
|
|
[Address(RVA = "0x224D450", Offset = "0x224BE50", VA = "0x18224D450", Slot = "16")]
|
|
internal override void ProcessBlock()
|
|
{
|
|
uint[] x = this.X;
|
|
int length = this.X.Length;
|
|
uint num;
|
|
num += (uint)1;
|
|
uint num2;
|
|
num2 += num2;
|
|
x[0] = num2;
|
|
while (num <= (uint)63)
|
|
{
|
|
}
|
|
uint num3 = this.H4;
|
|
int num4 = 0;
|
|
uint num5 = this.H3;
|
|
uint num6 = this.H5;
|
|
uint num7 = this.H1;
|
|
uint num8 = this.H2;
|
|
uint num9 = this.H6;
|
|
uint num10 = this.H7;
|
|
uint num11 = this.H8;
|
|
num6 = num2;
|
|
int length2 = Sha224Digest.K.Length;
|
|
int length3 = this.X.Length;
|
|
num2 = num6;
|
|
num6 = num9;
|
|
num2 += num6;
|
|
num11 += num2;
|
|
num2 = num7;
|
|
num11 = num8;
|
|
num11 += num2;
|
|
num2 = num3;
|
|
num11 = num3;
|
|
num2 += num3;
|
|
num6 = num11;
|
|
num10 += num2;
|
|
num2 = num11;
|
|
num11 += num10;
|
|
num11 += num2;
|
|
num2 = num5;
|
|
num11 = num5;
|
|
num2 += num5;
|
|
num9 += num2;
|
|
num8 += num9;
|
|
num2 = num11;
|
|
num3 = num11;
|
|
num5 = num11;
|
|
num9 += num5;
|
|
num9 += num2;
|
|
num4 += 3;
|
|
num2 = num8;
|
|
num11 = num8;
|
|
num5 = num9;
|
|
num2 += num5;
|
|
num6 += num2;
|
|
num2 = num9;
|
|
num7 += num6;
|
|
num11 += num6;
|
|
num11 += num2;
|
|
num2 = num7;
|
|
num11 = num8;
|
|
num5 = num7;
|
|
num2 += num5;
|
|
num3 += num2;
|
|
num2 = num11;
|
|
num3 = num9;
|
|
num5 = num9;
|
|
num3 += num2;
|
|
num4 += 5;
|
|
num2 = num11;
|
|
num3 = num11;
|
|
num2 += num11;
|
|
num11 = num3;
|
|
num5 += num2;
|
|
num2 = num3;
|
|
num11 += num5;
|
|
num11 += num2;
|
|
num2 = num11;
|
|
num3 = num11;
|
|
num2 += num3;
|
|
num8 += num2;
|
|
num9 += num8;
|
|
num2 = num11;
|
|
num3 = num11;
|
|
num8 += num3;
|
|
num8 += num2;
|
|
num4 += 7;
|
|
num2 = num9;
|
|
num4 += 8;
|
|
num3 = num8;
|
|
num2 += num3;
|
|
num7 += num2;
|
|
num11 += num7;
|
|
num2 = num8;
|
|
num3 = num11;
|
|
num7 += num3;
|
|
num4++;
|
|
num7 += num2;
|
|
int num12 = 0;
|
|
uint[] x2 = this.X;
|
|
this.H5 = num3;
|
|
this.H6 = num3;
|
|
this.H7 = num3;
|
|
this.xOff = (int)((ulong)0L);
|
|
Array.Clear(x2, num12, 16);
|
|
}
|
|
|
|
// Token: 0x06009FA8 RID: 40872 RVA: 0x0024FF90 File Offset: 0x0024E190
|
|
[Token(Token = "0x6009FA8")]
|
|
[Address(RVA = "0x704FE0", Offset = "0x7039E0", VA = "0x180704FE0")]
|
|
private static uint Ch(uint x, uint y, uint z)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x06009FA9 RID: 40873 RVA: 0x0024FFA0 File Offset: 0x0024E1A0
|
|
[Token(Token = "0x6009FA9")]
|
|
[Address(RVA = "0x7051E0", Offset = "0x703BE0", VA = "0x1807051E0")]
|
|
private static uint Maj(uint x, uint y, uint z)
|
|
{
|
|
return y;
|
|
}
|
|
|
|
// Token: 0x06009FAA RID: 40874 RVA: 0x0024FFB0 File Offset: 0x0024E1B0
|
|
[Token(Token = "0x6009FAA")]
|
|
[Address(RVA = "0x224E110", Offset = "0x224CB10", VA = "0x18224E110")]
|
|
private static uint Sum0(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x06009FAB RID: 40875 RVA: 0x0024FFC0 File Offset: 0x0024E1C0
|
|
[Token(Token = "0x6009FAB")]
|
|
[Address(RVA = "0x224E150", Offset = "0x224CB50", VA = "0x18224E150")]
|
|
private static uint Sum1(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x06009FAC RID: 40876 RVA: 0x0024FFD0 File Offset: 0x0024E1D0
|
|
[Token(Token = "0x6009FAC")]
|
|
[Address(RVA = "0x2120A90", Offset = "0x211F490", VA = "0x182120A90")]
|
|
private static uint Theta0(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x06009FAD RID: 40877 RVA: 0x0024FFE0 File Offset: 0x0024E1E0
|
|
[Token(Token = "0x6009FAD")]
|
|
[Address(RVA = "0x2120AC0", Offset = "0x211F4C0", VA = "0x182120AC0")]
|
|
private static uint Theta1(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x06009FAE RID: 40878 RVA: 0x0024FFF0 File Offset: 0x0024E1F0
|
|
[Token(Token = "0x6009FAE")]
|
|
[Address(RVA = "0x224D2E0", Offset = "0x224BCE0", VA = "0x18224D2E0", Slot = "20")]
|
|
public override IMemoable Copy()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009FAE)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Sha224Digest::Copy()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:Sha224Digest(var_0_06, newobj:Sha224Digest(Sha224Digest::.ctor, ldloc:Sha224Digest(this)))
|
|
stloc:uint32[](var_1_0E, newarr:uint32[]([mscorlib]System.UInt32, ldc.i4:int32(64)))
|
|
stfld:uint32[](Sha224Digest::X, ldloc:Sha224Digest(var_0_06), ldloc:uint32[](var_1_0E))
|
|
call:void(Sha224Digest::CopyIn, ldloc:Sha224Digest(var_0_06), ldloc:Sha224Digest(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: 0x06009FAF RID: 40879 RVA: 0x0025001C File Offset: 0x0024E21C
|
|
[Token(Token = "0x6009FAF")]
|
|
[Address(RVA = "0x224DFF0", Offset = "0x224C9F0", VA = "0x18224DFF0", Slot = "21")]
|
|
public override void Reset(IMemoable other)
|
|
{
|
|
do
|
|
{
|
|
if (other == 0)
|
|
{
|
|
}
|
|
}
|
|
while (other == 0);
|
|
}
|
|
|
|
// Token: 0x06009FB0 RID: 40880 RVA: 0x00250034 File Offset: 0x0024E234
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x6009FB0")]
|
|
[Address(RVA = "0x224E190", Offset = "0x224CB90", VA = "0x18224E190")]
|
|
static Sha224Digest()
|
|
{
|
|
uint[] array = new uint[64];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.433175D38B13FFE177FDD661A309F1B528B3F6E2).FieldHandle);
|
|
Sha224Digest.K = array;
|
|
}
|
|
|
|
// Token: 0x040068DB RID: 26843
|
|
[Token(Token = "0x40068DB")]
|
|
private const int DigestLength = 28;
|
|
|
|
// Token: 0x040068DC RID: 26844
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40068DC")]
|
|
private uint H1;
|
|
|
|
// Token: 0x040068DD RID: 26845
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
|
|
[Token(Token = "0x40068DD")]
|
|
private uint H2;
|
|
|
|
// Token: 0x040068DE RID: 26846
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40068DE")]
|
|
private uint H3;
|
|
|
|
// Token: 0x040068DF RID: 26847
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
|
|
[Token(Token = "0x40068DF")]
|
|
private uint H4;
|
|
|
|
// Token: 0x040068E0 RID: 26848
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x40068E0")]
|
|
private uint H5;
|
|
|
|
// Token: 0x040068E1 RID: 26849
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x3C")]
|
|
[Token(Token = "0x40068E1")]
|
|
private uint H6;
|
|
|
|
// Token: 0x040068E2 RID: 26850
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x40068E2")]
|
|
private uint H7;
|
|
|
|
// Token: 0x040068E3 RID: 26851
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x44")]
|
|
[Token(Token = "0x40068E3")]
|
|
private uint H8;
|
|
|
|
// Token: 0x040068E4 RID: 26852
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x40068E4")]
|
|
private uint[] X;
|
|
|
|
// Token: 0x040068E5 RID: 26853
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x40068E5")]
|
|
private int xOff;
|
|
|
|
// Token: 0x040068E6 RID: 26854
|
|
[Token(Token = "0x40068E6")]
|
|
internal static readonly uint[] K;
|
|
}
|
|
}
|