128 lines
5.8 KiB
C#
128 lines
5.8 KiB
C#
using System;
|
|
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: 0x0200171C RID: 5916
|
|
[Token(Token = "0x200171C")]
|
|
[StructLayout(3)]
|
|
public class Sha512Digest : LongDigest
|
|
{
|
|
// Token: 0x06009FCB RID: 40907 RVA: 0x00250944 File Offset: 0x0024EB44
|
|
[Token(Token = "0x6009FCB")]
|
|
[Address(RVA = "0x224FE40", Offset = "0x224E840", VA = "0x18224FE40")]
|
|
public Sha512Digest()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06009FCC RID: 40908 RVA: 0x00250958 File Offset: 0x0024EB58
|
|
[Token(Token = "0x6009FCC")]
|
|
[Address(RVA = "0x224FDD0", Offset = "0x224E7D0", VA = "0x18224FDD0")]
|
|
public Sha512Digest(Sha512Digest t)
|
|
: base(t)
|
|
{
|
|
}
|
|
|
|
// Token: 0x17001920 RID: 6432
|
|
// (get) Token: 0x06009FCD RID: 40909 RVA: 0x0025096C File Offset: 0x0024EB6C
|
|
[Token(Token = "0x17001920")]
|
|
public override string AlgorithmName
|
|
{
|
|
[Token(Token = "0x6009FCD")]
|
|
[Address(RVA = "0x224FEA0", Offset = "0x224E8A0", VA = "0x18224FEA0", Slot = "14")]
|
|
get
|
|
{
|
|
return "SHA-512";
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009FCE RID: 40910 RVA: 0x00250980 File Offset: 0x0024EB80
|
|
[Token(Token = "0x6009FCE")]
|
|
[Address(RVA = "0x2062AA0", Offset = "0x20614A0", VA = "0x182062AA0", Slot = "15")]
|
|
public override int GetDigestSize()
|
|
{
|
|
return 64;
|
|
}
|
|
|
|
// Token: 0x06009FCF RID: 40911 RVA: 0x00250990 File Offset: 0x0024EB90
|
|
[Token(Token = "0x6009FCF")]
|
|
[Address(RVA = "0x224FBC0", Offset = "0x224E5C0", VA = "0x18224FBC0", Slot = "16")]
|
|
public override int DoFinal(byte[] output, int outOff)
|
|
{
|
|
base.Finish();
|
|
Pack.UInt64_To_BE(this.H1, output, outOff);
|
|
Pack.UInt64_To_BE(this.H2, output, outOff);
|
|
Pack.UInt64_To_BE(this.H3, output, outOff);
|
|
Pack.UInt64_To_BE(this.H4, output, outOff);
|
|
Pack.UInt64_To_BE(this.H5, output, outOff);
|
|
Pack.UInt64_To_BE(this.H6, output, outOff);
|
|
Pack.UInt64_To_BE(this.H7, output, outOff);
|
|
Pack.UInt64_To_BE(this.H8, output, outOff);
|
|
return 64;
|
|
}
|
|
|
|
// Token: 0x06009FD0 RID: 40912 RVA: 0x00250A10 File Offset: 0x0024EC10
|
|
[Token(Token = "0x6009FD0")]
|
|
[Address(RVA = "0x224FD40", Offset = "0x224E740", VA = "0x18224FD40", Slot = "13")]
|
|
public override void Reset()
|
|
{
|
|
base.Reset();
|
|
this.H1 = (ulong)7640891576956012808L;
|
|
this.H2 = (ulong)(-4942790177534073029L);
|
|
this.H3 = (ulong)4354685564936845355L;
|
|
this.H4 = (ulong)(-6534734903238641935L);
|
|
this.H5 = (ulong)5840696475078001361L;
|
|
this.H6 = (ulong)(-7276294671716946913L);
|
|
this.H7 = (ulong)2270897969802886507L;
|
|
this.H8 = (ulong)6620516959819538809L;
|
|
}
|
|
|
|
// Token: 0x06009FD1 RID: 40913 RVA: 0x00250AA4 File Offset: 0x0024ECA4
|
|
[Token(Token = "0x6009FD1")]
|
|
[Address(RVA = "0x224FB30", Offset = "0x224E530", VA = "0x18224FB30", Slot = "17")]
|
|
public override IMemoable Copy()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009FD1)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Sha512Digest::Copy()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:Sha512Digest(var_0_06, newobj:Sha512Digest(Sha512Digest::.ctor, ldloc:Sha512Digest(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: 0x06009FD2 RID: 40914 RVA: 0x00250AB8 File Offset: 0x0024ECB8
|
|
[Token(Token = "0x6009FD2")]
|
|
[Address(RVA = "0x224FCA0", Offset = "0x224E6A0", VA = "0x18224FCA0", Slot = "18")]
|
|
public override void Reset(IMemoable other)
|
|
{
|
|
do
|
|
{
|
|
if (other == 0)
|
|
{
|
|
}
|
|
}
|
|
while (other == 0);
|
|
}
|
|
|
|
// Token: 0x040068F4 RID: 26868
|
|
[Token(Token = "0x40068F4")]
|
|
private const int DigestLength = 64;
|
|
}
|
|
}
|