scripts
This commit is contained in:
+432
@@ -0,0 +1,432 @@
|
||||
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: 0x0200171A RID: 5914
|
||||
[Token(Token = "0x200171A")]
|
||||
[StructLayout(3)]
|
||||
public class Sha256Digest : GeneralDigest
|
||||
{
|
||||
// Token: 0x06009FB1 RID: 40881 RVA: 0x0025005C File Offset: 0x0024E25C
|
||||
[Token(Token = "0x6009FB1")]
|
||||
[Address(RVA = "0x224F110", Offset = "0x224DB10", VA = "0x18224F110")]
|
||||
public Sha256Digest()
|
||||
{
|
||||
uint[] array = new uint[64];
|
||||
this.X = array;
|
||||
base..ctor();
|
||||
this.H1 = (uint)((ulong)1779033703L);
|
||||
this.H2 = (uint)((ulong)3144134277L);
|
||||
this.H3 = (uint)((ulong)1013904242L);
|
||||
this.H4 = (uint)((ulong)2773480762L);
|
||||
this.H5 = (uint)((ulong)1359893119L);
|
||||
this.H6 = (uint)((ulong)2600822924L);
|
||||
this.H7 = (uint)((ulong)528734635L);
|
||||
this.H8 = (uint)((ulong)1541459225L);
|
||||
}
|
||||
|
||||
// Token: 0x06009FB2 RID: 40882 RVA: 0x002500F0 File Offset: 0x0024E2F0
|
||||
[Token(Token = "0x6009FB2")]
|
||||
[Address(RVA = "0x224F1A0", Offset = "0x224DBA0", VA = "0x18224F1A0")]
|
||||
public Sha256Digest(Sha256Digest t)
|
||||
{
|
||||
uint[] array = new uint[64];
|
||||
this.X = array;
|
||||
base..ctor(t);
|
||||
this.CopyIn(t);
|
||||
}
|
||||
|
||||
// Token: 0x06009FB3 RID: 40883 RVA: 0x0025011C File Offset: 0x0024E31C
|
||||
[Token(Token = "0x6009FB3")]
|
||||
[Address(RVA = "0x22465F0", Offset = "0x2244FF0", VA = "0x1822465F0")]
|
||||
private void CopyIn(Sha256Digest 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: 0x1700191E RID: 6430
|
||||
// (get) Token: 0x06009FB4 RID: 40884 RVA: 0x002501EC File Offset: 0x0024E3EC
|
||||
[Token(Token = "0x1700191E")]
|
||||
public override string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x6009FB4")]
|
||||
[Address(RVA = "0x224F210", Offset = "0x224DC10", VA = "0x18224F210", Slot = "17")]
|
||||
get
|
||||
{
|
||||
return "SHA-256";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009FB5 RID: 40885 RVA: 0x00250200 File Offset: 0x0024E400
|
||||
[Token(Token = "0x6009FB5")]
|
||||
[Address(RVA = "0xC390D0", Offset = "0xC37AD0", VA = "0x180C390D0", Slot = "18")]
|
||||
public override int GetDigestSize()
|
||||
{
|
||||
return 32;
|
||||
}
|
||||
|
||||
// Token: 0x06009FB6 RID: 40886 RVA: 0x00250210 File Offset: 0x0024E410
|
||||
[Token(Token = "0x6009FB6")]
|
||||
[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: 0x06009FB7 RID: 40887 RVA: 0x00250250 File Offset: 0x0024E450
|
||||
[Token(Token = "0x6009FB7")]
|
||||
[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: 0x06009FB8 RID: 40888 RVA: 0x00250288 File Offset: 0x0024E488
|
||||
[Token(Token = "0x6009FB8")]
|
||||
[Address(RVA = "0x224E390", Offset = "0x224CD90", VA = "0x18224E390", 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);
|
||||
Pack.UInt32_To_BE(this.H8, output, outOff);
|
||||
return 32;
|
||||
}
|
||||
|
||||
// Token: 0x06009FB9 RID: 40889 RVA: 0x00250308 File Offset: 0x0024E508
|
||||
[Token(Token = "0x6009FB9")]
|
||||
[Address(RVA = "0x224EF90", Offset = "0x224D990", VA = "0x18224EF90", Slot = "13")]
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
uint[] x = this.X;
|
||||
this.H1 = (uint)((ulong)1779033703L);
|
||||
this.H2 = (uint)((ulong)3144134277L);
|
||||
this.H3 = (uint)((ulong)1013904242L);
|
||||
this.H4 = (uint)((ulong)2773480762L);
|
||||
this.H5 = (uint)((ulong)1359893119L);
|
||||
this.H6 = (uint)((ulong)2600822924L);
|
||||
this.H7 = (uint)((ulong)528734635L);
|
||||
this.H8 = (uint)((ulong)1541459225L);
|
||||
this.xOff = (int)((ulong)0L);
|
||||
int length = x.Length;
|
||||
int num = 0;
|
||||
Array.Clear(x, num, length);
|
||||
}
|
||||
|
||||
// Token: 0x06009FBA RID: 40890 RVA: 0x002503B4 File Offset: 0x0024E5B4
|
||||
[Token(Token = "0x6009FBA")]
|
||||
[Address(RVA = "0x224F240", Offset = "0x224DC40", VA = "0x18224F240")]
|
||||
private void initHs()
|
||||
{
|
||||
this.H1 = (uint)((ulong)1779033703L);
|
||||
this.H2 = (uint)((ulong)3144134277L);
|
||||
this.H3 = (uint)((ulong)1013904242L);
|
||||
this.H4 = (uint)((ulong)2773480762L);
|
||||
this.H5 = (uint)((ulong)1359893119L);
|
||||
this.H6 = (uint)((ulong)2600822924L);
|
||||
this.H7 = (uint)((ulong)528734635L);
|
||||
this.H8 = (uint)((ulong)1541459225L);
|
||||
}
|
||||
|
||||
// Token: 0x06009FBB RID: 40891 RVA: 0x00250434 File Offset: 0x0024E634
|
||||
[Token(Token = "0x6009FBB")]
|
||||
[Address(RVA = "0x224E470", Offset = "0x224CE70", VA = "0x18224E470", 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 = Sha256Digest.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: 0x06009FBC RID: 40892 RVA: 0x00250728 File Offset: 0x0024E928
|
||||
[Token(Token = "0x6009FBC")]
|
||||
[Address(RVA = "0x224F060", Offset = "0x224DA60", VA = "0x18224F060")]
|
||||
private static uint Sum1Ch(uint x, uint y, uint z)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x06009FBD RID: 40893 RVA: 0x00250738 File Offset: 0x0024E938
|
||||
[Token(Token = "0x6009FBD")]
|
||||
[Address(RVA = "0x224F010", Offset = "0x224DA10", VA = "0x18224F010")]
|
||||
private static uint Sum0Maj(uint x, uint y, uint z)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x06009FBE RID: 40894 RVA: 0x00250748 File Offset: 0x0024E948
|
||||
[Token(Token = "0x6009FBE")]
|
||||
[Address(RVA = "0x2120A90", Offset = "0x211F490", VA = "0x182120A90")]
|
||||
private static uint Theta0(uint x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x06009FBF RID: 40895 RVA: 0x00250758 File Offset: 0x0024E958
|
||||
[Token(Token = "0x6009FBF")]
|
||||
[Address(RVA = "0x2120AC0", Offset = "0x211F4C0", VA = "0x182120AC0")]
|
||||
private static uint Theta1(uint x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x06009FC0 RID: 40896 RVA: 0x00250768 File Offset: 0x0024E968
|
||||
[Token(Token = "0x6009FC0")]
|
||||
[Address(RVA = "0x224E2F0", Offset = "0x224CCF0", VA = "0x18224E2F0", Slot = "20")]
|
||||
public override IMemoable Copy()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009FC0)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Sha256Digest::Copy()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:Sha256Digest(var_0_06, newobj:Sha256Digest(Sha256Digest::.ctor, ldloc:Sha256Digest(this)))
|
||||
stloc:uint32[](var_1_0E, newarr:uint32[]([mscorlib]System.UInt32, ldc.i4:int32(64)))
|
||||
stfld:uint32[](Sha256Digest::X, ldloc:Sha256Digest(var_0_06), ldloc:uint32[](var_1_0E))
|
||||
call:void(Sha256Digest::CopyIn, ldloc:Sha256Digest(var_0_06), ldloc:Sha256Digest(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: 0x06009FC1 RID: 40897 RVA: 0x00250794 File Offset: 0x0024E994
|
||||
[Token(Token = "0x6009FC1")]
|
||||
[Address(RVA = "0x224EEF0", Offset = "0x224D8F0", VA = "0x18224EEF0", Slot = "21")]
|
||||
public override void Reset(IMemoable other)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (other == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (other == 0);
|
||||
}
|
||||
|
||||
// Token: 0x06009FC2 RID: 40898 RVA: 0x002507AC File Offset: 0x0024E9AC
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x6009FC2")]
|
||||
[Address(RVA = "0x224F0B0", Offset = "0x224DAB0", VA = "0x18224F0B0")]
|
||||
static Sha256Digest()
|
||||
{
|
||||
uint[] array = new uint[64];
|
||||
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.433175D38B13FFE177FDD661A309F1B528B3F6E2).FieldHandle);
|
||||
Sha256Digest.K = array;
|
||||
}
|
||||
|
||||
// Token: 0x040068E7 RID: 26855
|
||||
[Token(Token = "0x40068E7")]
|
||||
private const int DigestLength = 32;
|
||||
|
||||
// Token: 0x040068E8 RID: 26856
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40068E8")]
|
||||
private uint H1;
|
||||
|
||||
// Token: 0x040068E9 RID: 26857
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x40068E9")]
|
||||
private uint H2;
|
||||
|
||||
// Token: 0x040068EA RID: 26858
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40068EA")]
|
||||
private uint H3;
|
||||
|
||||
// Token: 0x040068EB RID: 26859
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x40068EB")]
|
||||
private uint H4;
|
||||
|
||||
// Token: 0x040068EC RID: 26860
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40068EC")]
|
||||
private uint H5;
|
||||
|
||||
// Token: 0x040068ED RID: 26861
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x3C")]
|
||||
[Token(Token = "0x40068ED")]
|
||||
private uint H6;
|
||||
|
||||
// Token: 0x040068EE RID: 26862
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40068EE")]
|
||||
private uint H7;
|
||||
|
||||
// Token: 0x040068EF RID: 26863
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x44")]
|
||||
[Token(Token = "0x40068EF")]
|
||||
private uint H8;
|
||||
|
||||
// Token: 0x040068F0 RID: 26864
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40068F0")]
|
||||
private uint[] X;
|
||||
|
||||
// Token: 0x040068F1 RID: 26865
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40068F1")]
|
||||
private int xOff;
|
||||
|
||||
// Token: 0x040068F2 RID: 26866
|
||||
[Token(Token = "0x40068F2")]
|
||||
private static readonly uint[] K;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user