558 lines
22 KiB
C#
558 lines
22 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Rfc8032;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
|
|
{
|
|
// Token: 0x02001CE2 RID: 7394
|
|
[Token(Token = "0x2001CE2")]
|
|
public class Dstu7564Digest : IDigest, IMemoable
|
|
{
|
|
// Token: 0x0600BA27 RID: 47655 RVA: 0x0029E34C File Offset: 0x0029C54C
|
|
[Token(Token = "0x600BA27")]
|
|
[Address(RVA = "0x1B37F70", Offset = "0x1B36D70", VA = "0x181B37F70")]
|
|
public Dstu7564Digest(Dstu7564Digest digest)
|
|
{
|
|
this.CopyIn(digest);
|
|
}
|
|
|
|
// Token: 0x0600BA28 RID: 47656 RVA: 0x0029E368 File Offset: 0x0029C568
|
|
[Token(Token = "0x600BA28")]
|
|
[Address(RVA = "0x1B364C0", Offset = "0x1B352C0", VA = "0x181B364C0")]
|
|
private void CopyIn(Dstu7564Digest digest)
|
|
{
|
|
int num = digest.hashSize;
|
|
this.hashSize = num;
|
|
int num2 = digest.blockSize;
|
|
this.blockSize = num2;
|
|
int num3 = digest.rounds;
|
|
this.rounds = num3;
|
|
int num4 = this.columns;
|
|
if (num4 > 0 && num4 == digest.S3)
|
|
{
|
|
ulong[] array = this.state;
|
|
ulong[] array2 = digest.state;
|
|
int num5 = 0;
|
|
int num6 = 0;
|
|
Array.Copy(array2, num6, array, num5, num4);
|
|
int num7 = this.blockSize;
|
|
int num8 = 0;
|
|
byte[] array3 = this.buf;
|
|
int num9 = 0;
|
|
Array.Copy(digest.buf, num9, array3, num8, num7);
|
|
}
|
|
int num10 = digest.columns;
|
|
this.columns = num10;
|
|
ulong[] array4 = Arrays.Clone(digest.state);
|
|
int num11 = this.columns;
|
|
this.state = array4;
|
|
ulong[] array5 = new ulong[num11];
|
|
int num12 = this.columns;
|
|
this.tempState1 = array5;
|
|
ulong[] array6 = new ulong[num12];
|
|
this.tempState2 = array6;
|
|
byte[] array7 = Arrays.Clone(digest.buf);
|
|
this.buf = array7;
|
|
ulong num13 = digest.inputBlocks;
|
|
this.inputBlocks = num13;
|
|
int num14 = digest.bufOff;
|
|
this.bufOff = num14;
|
|
}
|
|
|
|
// Token: 0x0600BA29 RID: 47657 RVA: 0x0029E498 File Offset: 0x0029C698
|
|
[Token(Token = "0x600BA29")]
|
|
[Address(RVA = "0x1B37FA0", Offset = "0x1B36DA0", VA = "0x181B37FA0")]
|
|
public Dstu7564Digest(int hashSizeBits)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA29)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Dstu7564Digest::.ctor(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_A6:
|
|
stloc:ArgumentException(var_11_B0, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Hash size is not recommended. Use 256/384/512 instead")))
|
|
}
|
|
|
|
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.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
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: 0x17001D0A RID: 7434
|
|
// (get) Token: 0x0600BA2A RID: 47658 RVA: 0x0029E558 File Offset: 0x0029C758
|
|
[Token(Token = "0x17001D0A")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600BA2A")]
|
|
[Address(RVA = "0x1B380F0", Offset = "0x1B36EF0", VA = "0x181B380F0", Slot = "13")]
|
|
get
|
|
{
|
|
return "DSTU7564";
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA2B RID: 47659 RVA: 0x0029E56C File Offset: 0x0029C76C
|
|
[Token(Token = "0x600BA2B")]
|
|
[Address(RVA = "0x3FA560", Offset = "0x3F9360", VA = "0x1803FA560", Slot = "14")]
|
|
public virtual int GetDigestSize()
|
|
{
|
|
return this.hashSize;
|
|
}
|
|
|
|
// Token: 0x0600BA2C RID: 47660 RVA: 0x0029E580 File Offset: 0x0029C780
|
|
[Token(Token = "0x600BA2C")]
|
|
[Address(RVA = "0x495080", Offset = "0x493E80", VA = "0x180495080", Slot = "15")]
|
|
public virtual int GetByteLength()
|
|
{
|
|
return this.blockSize;
|
|
}
|
|
|
|
// Token: 0x0600BA2D RID: 47661 RVA: 0x0029E594 File Offset: 0x0029C794
|
|
[Token(Token = "0x600BA2D")]
|
|
[Address(RVA = "0x1B37DE0", Offset = "0x1B36BE0", VA = "0x181B37DE0", Slot = "16")]
|
|
public virtual void Update(byte input)
|
|
{
|
|
byte[] array = this.buf;
|
|
int num = this.bufOff + 1;
|
|
this.bufOff = num;
|
|
int num2 = this.blockSize;
|
|
if (this.bufOff == num2)
|
|
{
|
|
this.Reset();
|
|
this.bufOff = (int)((ulong)0L);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA2E RID: 47662 RVA: 0x0029E5E0 File Offset: 0x0029C7E0
|
|
[Token(Token = "0x600BA2E")]
|
|
[Address(RVA = "0x1B363A0", Offset = "0x1B351A0", VA = "0x181B363A0", Slot = "17")]
|
|
public virtual void BlockUpdate(byte[] input, int inOff, int length)
|
|
{
|
|
if (this.bufOff != 0)
|
|
{
|
|
if (length <= 0)
|
|
{
|
|
return;
|
|
}
|
|
int byteLength = this.GetByteLength();
|
|
while (this.bufOff != 0)
|
|
{
|
|
}
|
|
}
|
|
if (length > 0)
|
|
{
|
|
this.Reset();
|
|
int num = this.blockSize;
|
|
while (length >= num)
|
|
{
|
|
}
|
|
if (length > 0)
|
|
{
|
|
int byteLength2 = this.GetByteLength();
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA2F RID: 47663 RVA: 0x0029E634 File Offset: 0x0029C834
|
|
[Token(Token = "0x600BA2F")]
|
|
[Address(RVA = "0x1B36650", Offset = "0x1B35450", VA = "0x181B36650", Slot = "18")]
|
|
public virtual int DoFinal(byte[] output, int outOff)
|
|
{
|
|
int num = this.bufOff;
|
|
byte[] array = this.buf;
|
|
int num2 = num + 1;
|
|
this.bufOff = num2;
|
|
int num3 = 0;
|
|
int num4 = this.blockSize;
|
|
int num5 = this.bufOff;
|
|
if (num5 < num4)
|
|
{
|
|
byte[] array2 = this.buf;
|
|
int num6 = num5 + 1;
|
|
this.bufOff = num6;
|
|
int num7 = this.bufOff;
|
|
}
|
|
this.bufOff = num3;
|
|
this.Reset();
|
|
int num8 = this.bufOff;
|
|
byte[] array3 = this.buf;
|
|
int num9 = num5 + 1;
|
|
this.bufOff = num9;
|
|
int num10 = this.bufOff;
|
|
ulong num11 = this.inputBlocks;
|
|
int num12 = this.blockSize;
|
|
byte[] array4 = this.buf;
|
|
ulong num13 = num11 * (ulong)num12;
|
|
num13 += (ulong)num;
|
|
Ed25519.Encode32((uint)num13, array4, num10);
|
|
ulong num14 = this.inputBlocks;
|
|
int num15 = this.blockSize;
|
|
int num16 = this.bufOff;
|
|
byte[] array5 = this.buf;
|
|
Pack.UInt64_To_LE(num14 * (ulong)num15, array5, num16);
|
|
this.Reset();
|
|
int num17 = this.columns;
|
|
int num18 = 0;
|
|
ulong[] array6 = this.tempState1;
|
|
int num19 = 0;
|
|
Array.Copy(this.state, num19, array6, num18, num17);
|
|
ulong[] array7 = this.tempState1;
|
|
this.P(array7);
|
|
int num20;
|
|
if (this.columns > 0)
|
|
{
|
|
ulong[] array8 = this.state;
|
|
ulong[] array9 = this.tempState1;
|
|
num3++;
|
|
num20 = this.columns;
|
|
}
|
|
int num21 = this.hashSize;
|
|
num21 += num3;
|
|
num20 -= num21;
|
|
if (num20 < num20)
|
|
{
|
|
Pack.UInt64_To_LE(this.state[num20], output, outOff);
|
|
num20++;
|
|
}
|
|
return this.hashSize;
|
|
}
|
|
|
|
// Token: 0x0600BA30 RID: 47664 RVA: 0x0029E7D0 File Offset: 0x0029C9D0
|
|
[Token(Token = "0x600BA30")]
|
|
[Address(RVA = "0x1B36EF0", Offset = "0x1B35CF0", VA = "0x181B36EF0", Slot = "19")]
|
|
public virtual void Reset()
|
|
{
|
|
ulong[] array = this.state;
|
|
int length = array.Length;
|
|
int num = 0;
|
|
Array.Clear(array, num, length);
|
|
ulong[] array2 = this.state;
|
|
int num2 = this.blockSize;
|
|
array2[0] = (ulong)num2;
|
|
int num3 = 0;
|
|
this.inputBlocks = (ulong)num3;
|
|
this.bufOff = num3;
|
|
}
|
|
|
|
// Token: 0x0600BA31 RID: 47665 RVA: 0x0029E828 File Offset: 0x0029CA28
|
|
[Token(Token = "0x600BA31")]
|
|
[Address(RVA = "0x1B36BD0", Offset = "0x1B359D0", VA = "0x181B36BD0", Slot = "20")]
|
|
protected virtual void ProcessBlock(byte[] input, int inOff)
|
|
{
|
|
int num = 0;
|
|
if (this.S3 > num)
|
|
{
|
|
ulong num2 = Pack.LE_To_UInt64(input, inOff);
|
|
ulong[] array = this.state;
|
|
ulong[] array2 = this.tempState1;
|
|
ulong num3 = array[num];
|
|
array2[0] = num3;
|
|
ulong[] array3 = this.tempState2;
|
|
num++;
|
|
array3[0] = num2;
|
|
}
|
|
ulong[] array4 = this.tempState1;
|
|
this.P(array4);
|
|
ulong[] array5 = this.tempState2;
|
|
if (this.rounds > num)
|
|
{
|
|
int num4 = this.columns;
|
|
if (num4 > 0)
|
|
{
|
|
num++;
|
|
ulong num5;
|
|
num4 = (int)((ulong)num4 - num5);
|
|
}
|
|
this.ShiftRows(array5);
|
|
this.SubBytes(array5);
|
|
this.MixColumns(array5);
|
|
num++;
|
|
}
|
|
if (this.S3 > num)
|
|
{
|
|
ulong[] array6 = this.state;
|
|
ulong[] array7 = this.tempState1;
|
|
ulong num6 = this.tempState2[num];
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA32 RID: 47666 RVA: 0x0029E904 File Offset: 0x0029CB04
|
|
[Token(Token = "0x600BA32")]
|
|
[Address(RVA = "0x1B36B20", Offset = "0x1B35920", VA = "0x181B36B20")]
|
|
private void P(ulong[] s)
|
|
{
|
|
int num = 0;
|
|
if (this.rounds > num)
|
|
{
|
|
int num2 = 0;
|
|
if (this.S3 > num2)
|
|
{
|
|
num2++;
|
|
num += 16;
|
|
}
|
|
this.ShiftRows(s);
|
|
this.SubBytes(s);
|
|
this.MixColumns(s);
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA33 RID: 47667 RVA: 0x0029E950 File Offset: 0x0029CB50
|
|
[Token(Token = "0x600BA33")]
|
|
[Address(RVA = "0x1B36E10", Offset = "0x1B35C10", VA = "0x181B36E10")]
|
|
private void Q(ulong[] s)
|
|
{
|
|
int num = 0;
|
|
if (this.rounds > num)
|
|
{
|
|
int num2 = this.columns;
|
|
int num3 = 0;
|
|
if (num2 > 0)
|
|
{
|
|
num3++;
|
|
ulong num4;
|
|
num2 = (int)((ulong)num2 - num4);
|
|
}
|
|
this.ShiftRows(s);
|
|
this.SubBytes(s);
|
|
this.MixColumns(s);
|
|
num++;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA34 RID: 47668 RVA: 0x0029E99C File Offset: 0x0029CB9C
|
|
[Token(Token = "0x600BA34")]
|
|
[Address(RVA = "0x1B36910", Offset = "0x1B35710", VA = "0x181B36910")]
|
|
private static ulong MixColumn(ulong c)
|
|
{
|
|
return c;
|
|
}
|
|
|
|
// Token: 0x0600BA35 RID: 47669 RVA: 0x0029E9AC File Offset: 0x0029CBAC
|
|
[Token(Token = "0x600BA35")]
|
|
[Address(RVA = "0x1B36A50", Offset = "0x1B35850", VA = "0x181B36A50")]
|
|
private void MixColumns(ulong[] s)
|
|
{
|
|
int num = 0;
|
|
if (this.S3 > num)
|
|
{
|
|
ulong num2 = Dstu7564Digest.MixColumn(s[num]);
|
|
num++;
|
|
s[0] = num2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA36 RID: 47670 RVA: 0x0029E9E4 File Offset: 0x0029CBE4
|
|
[Token(Token = "0x600BA36")]
|
|
[Address(RVA = "0x1B36FF0", Offset = "0x1B35DF0", VA = "0x181B36FF0")]
|
|
private static ulong Rotate(int n, ulong x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x0600BA37 RID: 47671 RVA: 0x0029E9F4 File Offset: 0x0029CBF4
|
|
[Token(Token = "0x600BA37")]
|
|
[Address(RVA = "0x1B37010", Offset = "0x1B35E10", VA = "0x181B37010")]
|
|
private void ShiftRows(ulong[] s)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA37)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Dstu7564Digest::ShiftRows(System.UInt64[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_13E:
|
|
stloc:InvalidOperationException(var_18_148, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("unsupported state size: only 512/1024 are allowed")))
|
|
}
|
|
|
|
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.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
|
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: 0x0600BA38 RID: 47672 RVA: 0x0029EB4C File Offset: 0x0029CD4C
|
|
[Token(Token = "0x600BA38")]
|
|
[Address(RVA = "0x1B37AE0", Offset = "0x1B368E0", VA = "0x181B37AE0")]
|
|
private void SubBytes(ulong[] s)
|
|
{
|
|
int num = 0;
|
|
if (this.S3 > num)
|
|
{
|
|
num += 4;
|
|
int length = Dstu7564Digest.S0.Length;
|
|
int length2 = Dstu7564Digest.S1.Length;
|
|
int length3 = Dstu7564Digest.S2.Length;
|
|
int length4 = Dstu7564Digest.S3.Length;
|
|
num++;
|
|
byte b;
|
|
num.m_value = (int)b;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA39 RID: 47673 RVA: 0x0029EBA8 File Offset: 0x0029CDA8
|
|
[Token(Token = "0x600BA39")]
|
|
[Address(RVA = "0x1B365F0", Offset = "0x1B353F0", VA = "0x181B365F0", Slot = "21")]
|
|
public virtual IMemoable Copy()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA39)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Dstu7564Digest::Copy()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
call:void(Dstu7564Digest::CopyIn, ldloc:Dstu7564Digest(var_0), ldloc:Dstu7564Digest(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: 0x0600BA3A RID: 47674 RVA: 0x0029EBBC File Offset: 0x0029CDBC
|
|
[Token(Token = "0x600BA3A")]
|
|
[Address(RVA = "0x1B36F50", Offset = "0x1B35D50", VA = "0x181B36F50", Slot = "22")]
|
|
public virtual void Reset(IMemoable other)
|
|
{
|
|
do
|
|
{
|
|
if (other == 0)
|
|
{
|
|
}
|
|
}
|
|
while (other == 0);
|
|
}
|
|
|
|
// Token: 0x0600BA3B RID: 47675 RVA: 0x0029EBD4 File Offset: 0x0029CDD4
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x600BA3B")]
|
|
[Address(RVA = "0x1B37E60", Offset = "0x1B36C60", VA = "0x181B37E60")]
|
|
static Dstu7564Digest()
|
|
{
|
|
byte[] array = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.6F5D2C37DFCDB1E72B86BC606C0E717C70E188A4).FieldHandle);
|
|
Dstu7564Digest.S0 = array;
|
|
byte[] array2 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array2, fieldof(<PrivateImplementationDetails>.79039C5C22F863E8EAE0E08E1318F343680E50A8).FieldHandle);
|
|
Dstu7564Digest.S1 = array2;
|
|
byte[] array3 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array3, fieldof(<PrivateImplementationDetails>.340B4B55E1DFD4BADC69CA57007FC1A4CDBA7943).FieldHandle);
|
|
Dstu7564Digest.S2 = array3;
|
|
byte[] array4 = new byte[256];
|
|
RuntimeHelpers.InitializeArray(array4, fieldof(<PrivateImplementationDetails>.5CFF612F2058DE2C287ECA5C6407ECC471F65576).FieldHandle);
|
|
Dstu7564Digest.S3 = array4;
|
|
}
|
|
|
|
// Token: 0x04007660 RID: 30304
|
|
[Token(Token = "0x4007660")]
|
|
private const int NB_512 = 8;
|
|
|
|
// Token: 0x04007661 RID: 30305
|
|
[Token(Token = "0x4007661")]
|
|
private const int NB_1024 = 16;
|
|
|
|
// Token: 0x04007662 RID: 30306
|
|
[Token(Token = "0x4007662")]
|
|
private const int NR_512 = 10;
|
|
|
|
// Token: 0x04007663 RID: 30307
|
|
[Token(Token = "0x4007663")]
|
|
private const int NR_1024 = 14;
|
|
|
|
// Token: 0x04007664 RID: 30308
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007664")]
|
|
private int hashSize;
|
|
|
|
// Token: 0x04007665 RID: 30309
|
|
[FieldOffset(Offset = "0x14")]
|
|
[Token(Token = "0x4007665")]
|
|
private int blockSize;
|
|
|
|
// Token: 0x04007666 RID: 30310
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007666")]
|
|
private int columns;
|
|
|
|
// Token: 0x04007667 RID: 30311
|
|
[FieldOffset(Offset = "0x1C")]
|
|
[Token(Token = "0x4007667")]
|
|
private int rounds;
|
|
|
|
// Token: 0x04007668 RID: 30312
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007668")]
|
|
private ulong[] state;
|
|
|
|
// Token: 0x04007669 RID: 30313
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4007669")]
|
|
private ulong[] tempState1;
|
|
|
|
// Token: 0x0400766A RID: 30314
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x400766A")]
|
|
private ulong[] tempState2;
|
|
|
|
// Token: 0x0400766B RID: 30315
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x400766B")]
|
|
private ulong inputBlocks;
|
|
|
|
// Token: 0x0400766C RID: 30316
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400766C")]
|
|
private int bufOff;
|
|
|
|
// Token: 0x0400766D RID: 30317
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400766D")]
|
|
private byte[] buf;
|
|
|
|
// Token: 0x0400766E RID: 30318
|
|
[Token(Token = "0x400766E")]
|
|
private static readonly byte[] S0;
|
|
|
|
// Token: 0x0400766F RID: 30319
|
|
[Token(Token = "0x400766F")]
|
|
private static readonly byte[] S1;
|
|
|
|
// Token: 0x04007670 RID: 30320
|
|
[Token(Token = "0x4007670")]
|
|
private static readonly byte[] S2;
|
|
|
|
// Token: 0x04007671 RID: 30321
|
|
[Token(Token = "0x4007671")]
|
|
private static readonly byte[] S3;
|
|
}
|
|
}
|