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: 0x02001DD6 RID: 7638
|
|
[Token(Token = "0x2001DD6")]
|
|
public class Sha224Digest : GeneralDigest
|
|
{
|
|
// Token: 0x0600BF46 RID: 48966 RVA: 0x002B0350 File Offset: 0x002AE550
|
|
[Token(Token = "0x600BF46")]
|
|
[Address(RVA = "0x290CE80", Offset = "0x290BE80", VA = "0x18290CE80")]
|
|
public Sha224Digest()
|
|
{
|
|
uint[] array = new uint[64];
|
|
this.X = array;
|
|
base..ctor();
|
|
IMemoable memoable = ((IMemoable)this).Copy();
|
|
}
|
|
|
|
// Token: 0x0600BF47 RID: 48967 RVA: 0x002B037C File Offset: 0x002AE57C
|
|
[Token(Token = "0x600BF47")]
|
|
[Address(RVA = "0x290CE10", Offset = "0x290BE10", VA = "0x18290CE10")]
|
|
public Sha224Digest(Sha224Digest t)
|
|
{
|
|
uint[] array = new uint[64];
|
|
this.X = array;
|
|
base..ctor(t);
|
|
this.CopyIn(t);
|
|
}
|
|
|
|
// Token: 0x0600BF48 RID: 48968 RVA: 0x002B03A8 File Offset: 0x002AE5A8
|
|
[Token(Token = "0x600BF48")]
|
|
[Address(RVA = "0x2905210", Offset = "0x2904210", VA = "0x182905210")]
|
|
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: 0x17001DBB RID: 7611
|
|
// (get) Token: 0x0600BF49 RID: 48969 RVA: 0x002B0478 File Offset: 0x002AE678
|
|
[Token(Token = "0x17001DBB")]
|
|
public override string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600BF49")]
|
|
[Address(RVA = "0x290CEE0", Offset = "0x290BEE0", VA = "0x18290CEE0", Slot = "17")]
|
|
get
|
|
{
|
|
return "SHA-224";
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BF4A RID: 48970 RVA: 0x002B048C File Offset: 0x002AE68C
|
|
[Token(Token = "0x600BF4A")]
|
|
[Address(RVA = "0xC41240", Offset = "0xC40240", VA = "0x180C41240", Slot = "18")]
|
|
public override int GetDigestSize()
|
|
{
|
|
return 28;
|
|
}
|
|
|
|
// Token: 0x0600BF4B RID: 48971 RVA: 0x002B049C File Offset: 0x002AE69C
|
|
[Token(Token = "0x600BF4B")]
|
|
[Address(RVA = "0x290CB80", Offset = "0x290BB80", VA = "0x18290CB80", 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: 0x0600BF4C RID: 48972 RVA: 0x002B04E4 File Offset: 0x002AE6E4
|
|
[Token(Token = "0x600BF4C")]
|
|
[Address(RVA = "0x290CAF0", Offset = "0x290BAF0", VA = "0x18290CAF0", Slot = "15")]
|
|
internal override void ProcessLength(long bitLength)
|
|
{
|
|
if (this.xOff > 14)
|
|
{
|
|
}
|
|
this.X[7] = (uint)bitLength;
|
|
this.X[7] = (uint)bitLength;
|
|
}
|
|
|
|
// Token: 0x0600BF4D RID: 48973 RVA: 0x002B051C File Offset: 0x002AE71C
|
|
[Token(Token = "0x600BF4D")]
|
|
[Address(RVA = "0x290BFA0", Offset = "0x290AFA0", VA = "0x18290BFA0", 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: 0x0600BF4E RID: 48974 RVA: 0x002B058C File Offset: 0x002AE78C
|
|
[Token(Token = "0x600BF4E")]
|
|
[Address(RVA = "0x290CCB0", Offset = "0x290BCB0", VA = "0x18290CCB0", 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: 0x0600BF4F RID: 48975 RVA: 0x002B063C File Offset: 0x002AE83C
|
|
[Token(Token = "0x600BF4F")]
|
|
[Address(RVA = "0x290C070", Offset = "0x290B070", VA = "0x18290C070", 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: 0x0600BF50 RID: 48976 RVA: 0x002B0930 File Offset: 0x002AEB30
|
|
[Token(Token = "0x600BF50")]
|
|
[Address(RVA = "0x10308B0", Offset = "0x102F8B0", VA = "0x1810308B0")]
|
|
private static uint Ch(uint x, uint y, uint z)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BF51 RID: 48977 RVA: 0x002B0940 File Offset: 0x002AEB40
|
|
[Token(Token = "0x600BF51")]
|
|
[Address(RVA = "0x1030AB0", Offset = "0x102FAB0", VA = "0x181030AB0")]
|
|
private static uint Maj(uint x, uint y, uint z)
|
|
{
|
|
return y;
|
|
}
|
|
|
|
// Token: 0x0600BF52 RID: 48978 RVA: 0x002B0950 File Offset: 0x002AEB50
|
|
[Token(Token = "0x600BF52")]
|
|
[Address(RVA = "0x290CD30", Offset = "0x290BD30", VA = "0x18290CD30")]
|
|
private static uint Sum0(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BF53 RID: 48979 RVA: 0x002B0960 File Offset: 0x002AEB60
|
|
[Token(Token = "0x600BF53")]
|
|
[Address(RVA = "0x290CD70", Offset = "0x290BD70", VA = "0x18290CD70")]
|
|
private static uint Sum1(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BF54 RID: 48980 RVA: 0x002B0970 File Offset: 0x002AEB70
|
|
[Token(Token = "0x600BF54")]
|
|
[Address(RVA = "0x27F07F0", Offset = "0x27EF7F0", VA = "0x1827F07F0")]
|
|
private static uint Theta0(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BF55 RID: 48981 RVA: 0x002B0980 File Offset: 0x002AEB80
|
|
[Token(Token = "0x600BF55")]
|
|
[Address(RVA = "0x27F0820", Offset = "0x27EF820", VA = "0x1827F0820")]
|
|
private static uint Theta1(uint x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BF56 RID: 48982 RVA: 0x002B0990 File Offset: 0x002AEB90
|
|
[Token(Token = "0x600BF56")]
|
|
[Address(RVA = "0x290BF00", Offset = "0x290AF00", VA = "0x18290BF00", Slot = "20")]
|
|
public override IMemoable Copy()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BF56)
|
|
|
|
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: 0x0600BF57 RID: 48983 RVA: 0x002B09BC File Offset: 0x002AEBBC
|
|
[Token(Token = "0x600BF57")]
|
|
[Address(RVA = "0x290CC10", Offset = "0x290BC10", VA = "0x18290CC10", Slot = "21")]
|
|
public override void Reset(IMemoable other)
|
|
{
|
|
do
|
|
{
|
|
if (other == 0)
|
|
{
|
|
}
|
|
}
|
|
while (other == 0);
|
|
}
|
|
|
|
// Token: 0x0600BF58 RID: 48984 RVA: 0x002B09D4 File Offset: 0x002AEBD4
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x600BF58")]
|
|
[Address(RVA = "0x290CDB0", Offset = "0x290BDB0", VA = "0x18290CDB0")]
|
|
static Sha224Digest()
|
|
{
|
|
uint[] array = new uint[64];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.433175D38B13FFE177FDD661A309F1B528B3F6E2).FieldHandle);
|
|
Sha224Digest.K = array;
|
|
}
|
|
|
|
// Token: 0x040078D7 RID: 30935
|
|
[Token(Token = "0x40078D7")]
|
|
private const int DigestLength = 28;
|
|
|
|
// Token: 0x040078D8 RID: 30936
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40078D8")]
|
|
private uint H1;
|
|
|
|
// Token: 0x040078D9 RID: 30937
|
|
[FieldOffset(Offset = "0x2C")]
|
|
[Token(Token = "0x40078D9")]
|
|
private uint H2;
|
|
|
|
// Token: 0x040078DA RID: 30938
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40078DA")]
|
|
private uint H3;
|
|
|
|
// Token: 0x040078DB RID: 30939
|
|
[FieldOffset(Offset = "0x34")]
|
|
[Token(Token = "0x40078DB")]
|
|
private uint H4;
|
|
|
|
// Token: 0x040078DC RID: 30940
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x40078DC")]
|
|
private uint H5;
|
|
|
|
// Token: 0x040078DD RID: 30941
|
|
[FieldOffset(Offset = "0x3C")]
|
|
[Token(Token = "0x40078DD")]
|
|
private uint H6;
|
|
|
|
// Token: 0x040078DE RID: 30942
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x40078DE")]
|
|
private uint H7;
|
|
|
|
// Token: 0x040078DF RID: 30943
|
|
[FieldOffset(Offset = "0x44")]
|
|
[Token(Token = "0x40078DF")]
|
|
private uint H8;
|
|
|
|
// Token: 0x040078E0 RID: 30944
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x40078E0")]
|
|
private uint[] X;
|
|
|
|
// Token: 0x040078E1 RID: 30945
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x40078E1")]
|
|
private int xOff;
|
|
|
|
// Token: 0x040078E2 RID: 30946
|
|
[Token(Token = "0x40078E2")]
|
|
internal static readonly uint[] K;
|
|
}
|
|
}
|