425 lines
13 KiB
C#
425 lines
13 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
|
|
{
|
|
// Token: 0x02001CF6 RID: 7414
|
|
[Token(Token = "0x2001CF6")]
|
|
public class Sha224Digest : GeneralDigest
|
|
{
|
|
// Token: 0x0600BB78 RID: 47992 RVA: 0x002A7A98 File Offset: 0x002A5C98
|
|
[Token(Token = "0x600BB78")]
|
|
[Address(RVA = "0x1FE01F0", Offset = "0x1FDEFF0", VA = "0x181FE01F0")]
|
|
public Sha224Digest()
|
|
{
|
|
uint[] array = new uint[64];
|
|
this.X = array;
|
|
base..ctor();
|
|
IMemoable memoable = ((IMemoable)this).Copy();
|
|
}
|
|
|
|
// Token: 0x0600BB79 RID: 47993 RVA: 0x002A7AC4 File Offset: 0x002A5CC4
|
|
[Token(Token = "0x600BB79")]
|
|
[Address(RVA = "0x1FE0180", Offset = "0x1FDEF80", VA = "0x181FE0180")]
|
|
public Sha224Digest(Sha224Digest t)
|
|
{
|
|
uint[] array = new uint[64];
|
|
this.X = array;
|
|
base..ctor(t);
|
|
this.CopyIn(t);
|
|
}
|
|
|
|
// Token: 0x0600BB7A RID: 47994 RVA: 0x002A7AF0 File Offset: 0x002A5CF0
|
|
[Token(Token = "0x600BB7A")]
|
|
[Address(RVA = "0x1FD8560", Offset = "0x1FD7360", VA = "0x181FD8560")]
|
|
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: 0x17001D1E RID: 7454
|
|
// (get) Token: 0x0600BB7B RID: 47995 RVA: 0x002A7BC0 File Offset: 0x002A5DC0
|
|
[Token(Token = "0x17001D1E")]
|
|
public override string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600BB7B")]
|
|
[Address(RVA = "0x1FE0250", Offset = "0x1FDF050", VA = "0x181FE0250", Slot = "17")]
|
|
get
|
|
{
|
|
return "SHA-224";
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BB7C RID: 47996 RVA: 0x002A7BD4 File Offset: 0x002A5DD4
|
|
[Token(Token = "0x600BB7C")]
|
|
[Address(RVA = "0x4B42D0", Offset = "0x4B30D0", VA = "0x1804B42D0", Slot = "18")]
|
|
public override int GetDigestSize()
|
|
{
|
|
return 28;
|
|
}
|
|
|
|
// Token: 0x0600BB7D RID: 47997 RVA: 0x002A7BE4 File Offset: 0x002A5DE4
|
|
[Token(Token = "0x600BB7D")]
|
|
[Address(RVA = "0x1FDFEF0", Offset = "0x1FDECF0", VA = "0x181FDFEF0", 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: 0x0600BB7E RID: 47998 RVA: 0x002A7C2C File Offset: 0x002A5E2C
|
|
[Token(Token = "0x600BB7E")]
|
|
[Address(RVA = "0x1FDFE60", Offset = "0x1FDEC60", VA = "0x181FDFE60", Slot = "15")]
|
|
internal override void ProcessLength(long bitLength)
|
|
{
|
|
if (this.xOff > 14)
|
|
{
|
|
}
|
|
this.X[7] = (uint)bitLength;
|
|
this.X[7] = (uint)bitLength;
|
|
}
|
|
|
|
// Token: 0x0600BB7F RID: 47999 RVA: 0x002A7C64 File Offset: 0x002A5E64
|
|
[Token(Token = "0x600BB7F")]
|
|
[Address(RVA = "0x1FDF300", Offset = "0x1FDE100", VA = "0x181FDF300", 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: 0x0600BB80 RID: 48000 RVA: 0x002A7CD4 File Offset: 0x002A5ED4
|
|
[Token(Token = "0x600BB80")]
|
|
[Address(RVA = "0x1FE0020", Offset = "0x1FDEE20", VA = "0x181FE0020", 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: 0x0600BB81 RID: 48001 RVA: 0x002A7D84 File Offset: 0x002A5F84
|
|
[Token(Token = "0x600BB81")]
|
|
[Address(RVA = "0x1FDF3E0", Offset = "0x1FDE1E0", VA = "0x181FDF3E0", 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: 0x0600BB82 RID: 48002 RVA: 0x002A8078 File Offset: 0x002A6278
|
|
[Token(Token = "0x600BB82")]
|
|
[Address(RVA = "0x1FDF250", Offset = "0x1FDE050", VA = "0x181FDF250")]
|
|
private static uint Ch(uint x, uint y, uint z)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BB83 RID: 48003 RVA: 0x002A8088 File Offset: 0x002A6288
|
|
[Token(Token = "0x600BB83")]
|
|
[Address(RVA = "0x1FDF3D0", Offset = "0x1FDE1D0", VA = "0x181FDF3D0")]
|
|
private static uint Maj(uint x, uint y, uint z)
|
|
{
|
|
return y;
|
|
}
|
|
|
|
// Token: 0x0600BB84 RID: 48004 RVA: 0x002A8098 File Offset: 0x002A6298
|
|
[Token(Token = "0x600BB84")]
|
|
[Address(RVA = "0x1FE00A0", Offset = "0x1FDEEA0", VA = "0x181FE00A0")]
|
|
private static uint Sum0(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BB85 RID: 48005 RVA: 0x002A80A8 File Offset: 0x002A62A8
|
|
[Token(Token = "0x600BB85")]
|
|
[Address(RVA = "0x1FE00E0", Offset = "0x1FDEEE0", VA = "0x181FE00E0")]
|
|
private static uint Sum1(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BB86 RID: 48006 RVA: 0x002A80B8 File Offset: 0x002A62B8
|
|
[Token(Token = "0x600BB86")]
|
|
[Address(RVA = "0x1DCE330", Offset = "0x1DCD130", VA = "0x181DCE330")]
|
|
private static uint Theta0(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BB87 RID: 48007 RVA: 0x002A80C8 File Offset: 0x002A62C8
|
|
[Token(Token = "0x600BB87")]
|
|
[Address(RVA = "0x1DCE360", Offset = "0x1DCD160", VA = "0x181DCE360")]
|
|
private static uint Theta1(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BB88 RID: 48008 RVA: 0x002A80D8 File Offset: 0x002A62D8
|
|
[Token(Token = "0x600BB88")]
|
|
[Address(RVA = "0x1FDF260", Offset = "0x1FDE060", VA = "0x181FDF260", Slot = "20")]
|
|
public override IMemoable Copy()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BB88)
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600BB89 RID: 48009 RVA: 0x002A8104 File Offset: 0x002A6304
|
|
[Token(Token = "0x600BB89")]
|
|
[Address(RVA = "0x1FDFF80", Offset = "0x1FDED80", VA = "0x181FDFF80", Slot = "21")]
|
|
public override void Reset(IMemoable other)
|
|
{
|
|
do
|
|
{
|
|
if (other == 0)
|
|
{
|
|
}
|
|
}
|
|
while (other == 0);
|
|
}
|
|
|
|
// Token: 0x0600BB8A RID: 48010 RVA: 0x002A811C File Offset: 0x002A631C
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x600BB8A")]
|
|
[Address(RVA = "0x1FE0120", Offset = "0x1FDEF20", VA = "0x181FE0120")]
|
|
static Sha224Digest()
|
|
{
|
|
uint[] array = new uint[64];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.433175D38B13FFE177FDD661A309F1B528B3F6E2).FieldHandle);
|
|
Sha224Digest.K = array;
|
|
}
|
|
|
|
// Token: 0x0400771E RID: 30494
|
|
[Token(Token = "0x400771E")]
|
|
private const int DigestLength = 28;
|
|
|
|
// Token: 0x0400771F RID: 30495
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400771F")]
|
|
private uint H1;
|
|
|
|
// Token: 0x04007720 RID: 30496
|
|
[FieldOffset(Offset = "0x2C")]
|
|
[Token(Token = "0x4007720")]
|
|
private uint H2;
|
|
|
|
// Token: 0x04007721 RID: 30497
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4007721")]
|
|
private uint H3;
|
|
|
|
// Token: 0x04007722 RID: 30498
|
|
[FieldOffset(Offset = "0x34")]
|
|
[Token(Token = "0x4007722")]
|
|
private uint H4;
|
|
|
|
// Token: 0x04007723 RID: 30499
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4007723")]
|
|
private uint H5;
|
|
|
|
// Token: 0x04007724 RID: 30500
|
|
[FieldOffset(Offset = "0x3C")]
|
|
[Token(Token = "0x4007724")]
|
|
private uint H6;
|
|
|
|
// Token: 0x04007725 RID: 30501
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4007725")]
|
|
private uint H7;
|
|
|
|
// Token: 0x04007726 RID: 30502
|
|
[FieldOffset(Offset = "0x44")]
|
|
[Token(Token = "0x4007726")]
|
|
private uint H8;
|
|
|
|
// Token: 0x04007727 RID: 30503
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x4007727")]
|
|
private uint[] X;
|
|
|
|
// Token: 0x04007728 RID: 30504
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4007728")]
|
|
private int xOff;
|
|
|
|
// Token: 0x04007729 RID: 30505
|
|
[Token(Token = "0x4007729")]
|
|
internal static readonly uint[] K;
|
|
}
|
|
}
|