791 lines
24 KiB
C#
791 lines
24 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
|
|
{
|
|
// Token: 0x02001706 RID: 5894
|
|
[Token(Token = "0x2001706")]
|
|
[StructLayout(3)]
|
|
public class Gost3411Digest : IDigest, IMemoable
|
|
{
|
|
// Token: 0x06009E62 RID: 40546 RVA: 0x00246B40 File Offset: 0x00244D40
|
|
[Token(Token = "0x6009E62")]
|
|
[Address(RVA = "0x2180CB0", Offset = "0x217F6B0", VA = "0x182180CB0")]
|
|
private static byte[][] MakeC()
|
|
{
|
|
byte[][] array = new byte[4][];
|
|
int num = 0;
|
|
byte[] array2 = new byte[32];
|
|
if (array2 != 0)
|
|
{
|
|
}
|
|
num++;
|
|
array[0] = array2;
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x06009E63 RID: 40547 RVA: 0x00246B78 File Offset: 0x00244D78
|
|
[Token(Token = "0x6009E63")]
|
|
[Address(RVA = "0x21814F0", Offset = "0x217FEF0", VA = "0x1821814F0")]
|
|
public Gost3411Digest()
|
|
{
|
|
byte[] array = new byte[32];
|
|
this.H = array;
|
|
byte[] array2 = new byte[32];
|
|
this.L = array2;
|
|
byte[] array3 = new byte[32];
|
|
this.M = array3;
|
|
byte[] array4 = new byte[32];
|
|
this.Sum = array4;
|
|
byte[][] array5 = Gost3411Digest.MakeC();
|
|
this.C = array5;
|
|
byte[] array6 = new byte[32];
|
|
this.xBuf = array6;
|
|
Gost28147Engine gost28147Engine = new Gost28147Engine();
|
|
this.cipher = gost28147Engine;
|
|
byte[] array7 = new byte[32];
|
|
this.K = array7;
|
|
byte[] array8 = new byte[8];
|
|
this.a = array8;
|
|
short[] array9 = new short[16];
|
|
this.wS = array9;
|
|
short[] array10 = new short[16];
|
|
this.w_S = array10;
|
|
byte[] array11 = new byte[32];
|
|
this.S = array11;
|
|
byte[] array12 = new byte[32];
|
|
this.U = array12;
|
|
byte[] array13 = new byte[32];
|
|
this.V = array13;
|
|
byte[] array14 = new byte[32];
|
|
this.W = array14;
|
|
base..ctor();
|
|
byte[] sbox = Gost28147Engine.GetSBox("D-A");
|
|
IBlockCipher blockCipher = this.cipher;
|
|
this.sBox = sbox;
|
|
int num;
|
|
ParametersWithSBox parametersWithSBox = new ParametersWithSBox(num, sbox);
|
|
num = 0;
|
|
this.Reset();
|
|
}
|
|
|
|
// Token: 0x06009E64 RID: 40548 RVA: 0x00246CB8 File Offset: 0x00244EB8
|
|
[Token(Token = "0x6009E64")]
|
|
[Address(RVA = "0x21818F0", Offset = "0x21802F0", VA = "0x1821818F0")]
|
|
public Gost3411Digest(byte[] sBoxParam)
|
|
{
|
|
byte[] array = new byte[32];
|
|
this.H = array;
|
|
byte[] array2 = new byte[32];
|
|
this.L = array2;
|
|
byte[] array3 = new byte[32];
|
|
this.M = array3;
|
|
byte[] array4 = new byte[32];
|
|
this.Sum = array4;
|
|
byte[][] array5 = Gost3411Digest.MakeC();
|
|
this.C = array5;
|
|
byte[] array6 = new byte[32];
|
|
this.xBuf = array6;
|
|
Gost28147Engine gost28147Engine = new Gost28147Engine();
|
|
this.cipher = gost28147Engine;
|
|
byte[] array7 = new byte[32];
|
|
this.K = array7;
|
|
byte[] array8 = new byte[8];
|
|
this.a = array8;
|
|
short[] array9 = new short[16];
|
|
this.wS = array9;
|
|
short[] array10 = new short[16];
|
|
this.w_S = array10;
|
|
byte[] array11 = new byte[32];
|
|
this.S = array11;
|
|
byte[] array12 = new byte[32];
|
|
this.U = array12;
|
|
byte[] array13 = new byte[32];
|
|
this.V = array13;
|
|
byte[] array14 = new byte[32];
|
|
this.W = array14;
|
|
base..ctor();
|
|
byte[] array15 = Arrays.Clone(sBoxParam);
|
|
IBlockCipher blockCipher = this.cipher;
|
|
this.sBox = array15;
|
|
int num;
|
|
ParametersWithSBox parametersWithSBox = new ParametersWithSBox(num, array15);
|
|
num = 0;
|
|
this.Reset();
|
|
}
|
|
|
|
// Token: 0x06009E65 RID: 40549 RVA: 0x00246DF4 File Offset: 0x00244FF4
|
|
[Token(Token = "0x6009E65")]
|
|
[Address(RVA = "0x2181730", Offset = "0x2180130", VA = "0x182181730")]
|
|
public Gost3411Digest(Gost3411Digest t)
|
|
{
|
|
byte[] array = new byte[32];
|
|
this.H = array;
|
|
byte[] array2 = new byte[32];
|
|
this.L = array2;
|
|
byte[] array3 = new byte[32];
|
|
this.M = array3;
|
|
byte[] array4 = new byte[32];
|
|
this.Sum = array4;
|
|
byte[][] array5 = Gost3411Digest.MakeC();
|
|
this.C = array5;
|
|
byte[] array6 = new byte[32];
|
|
this.xBuf = array6;
|
|
Gost28147Engine gost28147Engine = new Gost28147Engine();
|
|
this.cipher = gost28147Engine;
|
|
byte[] array7 = new byte[32];
|
|
this.K = array7;
|
|
byte[] array8 = new byte[8];
|
|
this.a = array8;
|
|
short[] array9 = new short[16];
|
|
this.wS = array9;
|
|
short[] array10 = new short[16];
|
|
this.w_S = array10;
|
|
byte[] array11 = new byte[32];
|
|
this.S = array11;
|
|
byte[] array12 = new byte[32];
|
|
this.U = array12;
|
|
byte[] array13 = new byte[32];
|
|
this.V = array13;
|
|
byte[] array14 = new byte[32];
|
|
this.W = array14;
|
|
base..ctor();
|
|
this.Reset(t);
|
|
}
|
|
|
|
// Token: 0x1700190A RID: 6410
|
|
// (get) Token: 0x06009E66 RID: 40550 RVA: 0x00246F04 File Offset: 0x00245104
|
|
[Token(Token = "0x1700190A")]
|
|
public string AlgorithmName
|
|
{
|
|
[Token(Token = "0x6009E66")]
|
|
[Address(RVA = "0x21820A0", Offset = "0x2180AA0", VA = "0x1821820A0", Slot = "4")]
|
|
get
|
|
{
|
|
return "Gost3411";
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E67 RID: 40551 RVA: 0x00246F18 File Offset: 0x00245118
|
|
[Token(Token = "0x6009E67")]
|
|
[Address(RVA = "0xC390D0", Offset = "0xC37AD0", VA = "0x180C390D0", Slot = "5")]
|
|
public int GetDigestSize()
|
|
{
|
|
return 32;
|
|
}
|
|
|
|
// Token: 0x06009E68 RID: 40552 RVA: 0x00246F28 File Offset: 0x00245128
|
|
[Token(Token = "0x6009E68")]
|
|
[Address(RVA = "0x2181410", Offset = "0x217FE10", VA = "0x182181410", Slot = "7")]
|
|
public void Update(byte input)
|
|
{
|
|
byte[] array = this.xBuf;
|
|
int num = this.xBufOff + 1;
|
|
this.xBufOff = num;
|
|
byte[] array2 = this.xBuf;
|
|
int length = array2.Length;
|
|
if (this.xBufOff == length)
|
|
{
|
|
this.sumByteArray(array2);
|
|
byte[] array3 = this.xBuf;
|
|
int num2 = 0;
|
|
this.processBlock(array3, num2);
|
|
this.xBufOff = (int)((ulong)0L);
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E69 RID: 40553 RVA: 0x00246F90 File Offset: 0x00245190
|
|
[Token(Token = "0x6009E69")]
|
|
[Address(RVA = "0x2180580", Offset = "0x217EF80", VA = "0x182180580", Slot = "8")]
|
|
public void BlockUpdate(byte[] input, int inOff, int length)
|
|
{
|
|
int num = 0;
|
|
int num2 = this.xBufOff;
|
|
if (num2 != 0 && length > 0)
|
|
{
|
|
byte[] array = this.xBuf;
|
|
int num3 = num2 + 1;
|
|
this.xBufOff = num3;
|
|
byte[] array2 = this.xBuf;
|
|
int num4 = this.xBufOff;
|
|
if (num4 == array2.Length)
|
|
{
|
|
this.sumByteArray(array2);
|
|
byte[] array3 = this.xBuf;
|
|
int num5 = 0;
|
|
this.processBlock(array3, num5);
|
|
this.xBufOff = num;
|
|
}
|
|
while (num4 != 0)
|
|
{
|
|
}
|
|
}
|
|
byte[] array4 = this.xBuf;
|
|
if (length > array4.Length)
|
|
{
|
|
int length2 = array4.Length;
|
|
int num6 = 0;
|
|
Array.Copy(input, inOff, array4, num6, length2);
|
|
byte[] array5 = this.xBuf;
|
|
int length3 = this.Sum.Length;
|
|
if (num != length3)
|
|
{
|
|
byte b;
|
|
num += (int)b;
|
|
byte b2;
|
|
num += (int)b2;
|
|
num++;
|
|
}
|
|
byte[] array6 = this.xBuf;
|
|
int num7 = 0;
|
|
this.processBlock(array6, num7);
|
|
int length4 = this.xBuf.Length;
|
|
}
|
|
if (length > 0)
|
|
{
|
|
int num8 = this.xBufOff;
|
|
byte[] array7 = this.xBuf;
|
|
int num9 = num8 + 1;
|
|
this.xBufOff = num9;
|
|
int length5 = this.xBuf.Length;
|
|
if (this.xBufOff == length5)
|
|
{
|
|
int length6 = this.Sum.Length;
|
|
if (num != length6)
|
|
{
|
|
byte b3;
|
|
num += (int)b3;
|
|
byte b4;
|
|
num += (int)b4;
|
|
num++;
|
|
}
|
|
byte[] array8 = this.xBuf;
|
|
int num10 = 0;
|
|
this.processBlock(array8, num10);
|
|
this.xBufOff = num;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E6A RID: 40554 RVA: 0x002470FC File Offset: 0x002452FC
|
|
[Token(Token = "0x6009E6A")]
|
|
[Address(RVA = "0x2180D70", Offset = "0x217F770", VA = "0x182180D70")]
|
|
private byte[] P(byte[] input)
|
|
{
|
|
int num = 0;
|
|
byte[] k = this.K;
|
|
byte[] k2 = this.K;
|
|
byte[] k3 = this.K;
|
|
num += 2;
|
|
byte[] k4 = this.K;
|
|
num++;
|
|
return this.K;
|
|
}
|
|
|
|
// Token: 0x06009E6B RID: 40555 RVA: 0x00247140 File Offset: 0x00245340
|
|
[Token(Token = "0x6009E6B")]
|
|
[Address(RVA = "0x2180490", Offset = "0x217EE90", VA = "0x182180490")]
|
|
private byte[] A(byte[] input)
|
|
{
|
|
int num = 0;
|
|
int length = input.Length;
|
|
byte[] array = this.a;
|
|
byte b = input[num];
|
|
num++;
|
|
int num2 = 0;
|
|
ulong num3;
|
|
Array.Copy(input, 8, input, num2, (int)num3);
|
|
byte[] array2 = this.a;
|
|
int num4 = 0;
|
|
ulong num5;
|
|
Array.Copy(array2, num4, input, 24, (int)num5);
|
|
return input;
|
|
}
|
|
|
|
// Token: 0x06009E6C RID: 40556 RVA: 0x00247198 File Offset: 0x00245398
|
|
[Token(Token = "0x6009E6C")]
|
|
[Address(RVA = "0x2180BD0", Offset = "0x217F5D0", VA = "0x182180BD0")]
|
|
private void E(byte[] key, byte[] s, int sOff, byte[] input, int inOff)
|
|
{
|
|
IBlockCipher blockCipher = this.cipher;
|
|
KeyParameter keyParameter = new KeyParameter(key);
|
|
IBlockCipher blockCipher2 = this.cipher;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009E6D RID: 40557 RVA: 0x002471C0 File Offset: 0x002453C0
|
|
[Token(Token = "0x6009E6D")]
|
|
[Address(RVA = "0x2181D80", Offset = "0x2180780", VA = "0x182181D80")]
|
|
private void fw(byte[] input)
|
|
{
|
|
short[] array = this.wS;
|
|
int num = 0;
|
|
int num2 = input.Length;
|
|
num2 -= input;
|
|
if (num < num2)
|
|
{
|
|
num++;
|
|
num += 2;
|
|
byte b;
|
|
array[0] = (short)b;
|
|
}
|
|
short[] array2 = this.wS;
|
|
short[] array3 = this.w_S;
|
|
int length = array2.Length;
|
|
short num3 = array2[3];
|
|
int num4 = 0;
|
|
array3[3] = num3;
|
|
short[] array4 = this.w_S;
|
|
ulong num5;
|
|
Array.Copy(this.wS, 1, array4, num4, (int)num5);
|
|
short[] array5 = this.w_S;
|
|
int num6 = input.Length;
|
|
num6--;
|
|
if (num < num6)
|
|
{
|
|
short num7 = array5[num];
|
|
num++;
|
|
num += 2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E6E RID: 40558 RVA: 0x00247274 File Offset: 0x00245474
|
|
[Token(Token = "0x6009E6E")]
|
|
[Address(RVA = "0x21820D0", Offset = "0x2180AD0", VA = "0x1821820D0")]
|
|
private void processBlock(byte[] input, int inOff)
|
|
{
|
|
byte[] m = this.M;
|
|
int num = 0;
|
|
int num2 = 0;
|
|
ulong num3;
|
|
Array.Copy(input, inOff, m, num2, (int)num3);
|
|
byte[] h = this.H;
|
|
byte[] u = this.U;
|
|
byte[] m2 = this.M;
|
|
byte[] v = this.V;
|
|
byte[] u2 = this.U;
|
|
byte[] v2 = this.V;
|
|
byte[] w = this.W;
|
|
num++;
|
|
byte[] w2 = this.W;
|
|
byte[] array = this.P(w2);
|
|
byte[] h2 = this.H;
|
|
int num4 = 0;
|
|
byte[] s = this.S;
|
|
this.E(array, s, num4, h2, num);
|
|
byte[] u3 = this.U;
|
|
byte[] array2 = this.A(u3);
|
|
uint num5;
|
|
byte[] array3 = this.C[(int)num5];
|
|
byte[] u4 = this.U;
|
|
num++;
|
|
byte[] v3 = this.V;
|
|
byte[] array4 = this.A(v3);
|
|
byte[] array5 = this.A(array4);
|
|
this.V = array5;
|
|
byte[] u5 = this.U;
|
|
byte[] v4 = this.V;
|
|
byte[] w3 = this.W;
|
|
num++;
|
|
byte[] w4 = this.W;
|
|
byte[] array6 = this.P(w4);
|
|
byte[] h3 = this.H;
|
|
byte[] s2 = this.S;
|
|
this.E(array6, s2, num, h3, num);
|
|
num5 += (uint)1;
|
|
byte[] s3 = this.S;
|
|
this.fw(s3);
|
|
byte[] s4 = this.S;
|
|
byte[] m3 = this.M;
|
|
num++;
|
|
byte[] s5 = this.S;
|
|
this.fw(s5);
|
|
byte[] h4 = this.H;
|
|
byte[] s6 = this.S;
|
|
num++;
|
|
byte[] s7 = this.S;
|
|
this.fw(s7);
|
|
while (num != 32)
|
|
{
|
|
}
|
|
byte[] h5 = this.H;
|
|
int length = h5.Length;
|
|
int num6 = 0;
|
|
byte[] s8 = this.S;
|
|
int num7 = 0;
|
|
Array.Copy(s8, num7, h5, num6, length);
|
|
}
|
|
|
|
// Token: 0x06009E6F RID: 40559 RVA: 0x00247444 File Offset: 0x00245644
|
|
[Token(Token = "0x6009E6F")]
|
|
[Address(RVA = "0x2181CB0", Offset = "0x21806B0", VA = "0x182181CB0")]
|
|
private void finish()
|
|
{
|
|
ulong num = this.byteCount;
|
|
byte[] l = this.L;
|
|
Pack.UInt64_To_LE(num, l);
|
|
int num2 = this.xBufOff;
|
|
if (num2 != 0)
|
|
{
|
|
int num3 = 0;
|
|
byte[] array = this.xBuf;
|
|
int num4 = num2 + 1;
|
|
this.xBufOff = num4;
|
|
byte[] array2 = this.xBuf;
|
|
int num5 = this.xBufOff;
|
|
if (num5 == array2.Length)
|
|
{
|
|
this.sumByteArray(array2);
|
|
byte[] array3 = this.xBuf;
|
|
int num6 = 0;
|
|
this.processBlock(array3, num6);
|
|
this.xBufOff = num3;
|
|
}
|
|
while (num5 != 0)
|
|
{
|
|
}
|
|
}
|
|
byte[] l2 = this.L;
|
|
int num7 = 0;
|
|
this.processBlock(l2, num7);
|
|
byte[] sum = this.Sum;
|
|
int num8 = 0;
|
|
this.processBlock(sum, num8);
|
|
}
|
|
|
|
// Token: 0x06009E70 RID: 40560 RVA: 0x00247500 File Offset: 0x00245700
|
|
[Token(Token = "0x6009E70")]
|
|
[Address(RVA = "0x2180AB0", Offset = "0x217F4B0", VA = "0x182180AB0", Slot = "9")]
|
|
public int DoFinal(byte[] output, int outOff)
|
|
{
|
|
ulong num = this.byteCount;
|
|
byte[] l = this.L;
|
|
Pack.UInt64_To_LE(num, l);
|
|
int num2 = this.xBufOff;
|
|
if (num2 != 0)
|
|
{
|
|
int num3 = 0;
|
|
byte[] array = this.xBuf;
|
|
int num4 = num2 + 1;
|
|
this.xBufOff = num4;
|
|
byte[] array2 = this.xBuf;
|
|
int num5 = this.xBufOff;
|
|
if (num5 == array2.Length)
|
|
{
|
|
this.sumByteArray(array2);
|
|
byte[] array3 = this.xBuf;
|
|
int num6 = 0;
|
|
this.processBlock(array3, num6);
|
|
this.xBufOff = num3;
|
|
}
|
|
while (num5 != 0)
|
|
{
|
|
}
|
|
}
|
|
byte[] l2 = this.L;
|
|
int num7 = 0;
|
|
this.processBlock(l2, num7);
|
|
byte[] sum = this.Sum;
|
|
int num8 = 0;
|
|
this.processBlock(sum, num8);
|
|
byte[] h = this.H;
|
|
this.Reset();
|
|
return 32;
|
|
}
|
|
|
|
// Token: 0x06009E71 RID: 40561 RVA: 0x002475CC File Offset: 0x002457CC
|
|
[Token(Token = "0x6009E71")]
|
|
[Address(RVA = "0x2180EF0", Offset = "0x217F8F0", VA = "0x182180EF0", Slot = "10")]
|
|
public void Reset()
|
|
{
|
|
byte[] h = this.H;
|
|
int num = 0;
|
|
this.byteCount = (ulong)num;
|
|
this.xBufOff = num;
|
|
int length = h.Length;
|
|
int num2 = 0;
|
|
Array.Clear(h, num2, length);
|
|
byte[] l = this.L;
|
|
int length2 = l.Length;
|
|
int num3 = 0;
|
|
Array.Clear(l, num3, length2);
|
|
byte[] m = this.M;
|
|
int length3 = m.Length;
|
|
int num4 = 0;
|
|
Array.Clear(m, num4, length3);
|
|
byte[] array = this.C[1];
|
|
int length4 = array.Length;
|
|
int num5 = 0;
|
|
Array.Clear(array, num5, length4);
|
|
byte[] array2 = this.C[3];
|
|
int length5 = array2.Length;
|
|
int num6 = 0;
|
|
Array.Clear(array2, num6, length5);
|
|
byte[] sum = this.Sum;
|
|
int length6 = sum.Length;
|
|
int num7 = 0;
|
|
Array.Clear(sum, num7, length6);
|
|
byte[] array3 = this.xBuf;
|
|
int length7 = array3.Length;
|
|
int num8 = 0;
|
|
Array.Clear(array3, num8, length7);
|
|
byte[][] c = this.C;
|
|
byte[] c2 = Gost3411Digest.C2;
|
|
byte[] array4 = c[2];
|
|
}
|
|
|
|
// Token: 0x06009E72 RID: 40562 RVA: 0x002476EC File Offset: 0x002458EC
|
|
[Token(Token = "0x6009E72")]
|
|
[Address(RVA = "0x2182590", Offset = "0x2180F90", VA = "0x182182590")]
|
|
private void sumByteArray(byte[] input)
|
|
{
|
|
int num = 0;
|
|
byte[] sum = this.Sum;
|
|
if (num != sum.Length)
|
|
{
|
|
num++;
|
|
byte b;
|
|
num += (int)b;
|
|
byte b2;
|
|
num += (int)b2;
|
|
byte[] sum2 = this.Sum;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E73 RID: 40563 RVA: 0x00247728 File Offset: 0x00245928
|
|
[Token(Token = "0x6009E73")]
|
|
[Address(RVA = "0x2181B30", Offset = "0x2180530", VA = "0x182181B30")]
|
|
private static void cpyBytesToShort(byte[] S, short[] wS)
|
|
{
|
|
int num = 0;
|
|
int num2 = S.Length;
|
|
num2 -= wS;
|
|
if (num < num2)
|
|
{
|
|
num++;
|
|
num += 2;
|
|
byte b;
|
|
wS[0] = (short)b;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E74 RID: 40564 RVA: 0x0024775C File Offset: 0x0024595C
|
|
[Token(Token = "0x6009E74")]
|
|
[Address(RVA = "0x2181BE0", Offset = "0x21805E0", VA = "0x182181BE0")]
|
|
private static void cpyShortToBytes(short[] wS, byte[] S)
|
|
{
|
|
int num = 0;
|
|
int num2 = S.Length;
|
|
num2 -= S;
|
|
if (num < num2)
|
|
{
|
|
short num3 = wS[num];
|
|
num++;
|
|
num += 2;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06009E75 RID: 40565 RVA: 0x00247790 File Offset: 0x00245990
|
|
[Token(Token = "0x6009E75")]
|
|
[Address(RVA = "0xC390D0", Offset = "0xC37AD0", VA = "0x180C390D0", Slot = "6")]
|
|
public int GetByteLength()
|
|
{
|
|
return 32;
|
|
}
|
|
|
|
// Token: 0x06009E76 RID: 40566 RVA: 0x002477A0 File Offset: 0x002459A0
|
|
[Token(Token = "0x6009E76")]
|
|
[Address(RVA = "0x21808C0", Offset = "0x217F2C0", VA = "0x1821808C0", Slot = "11")]
|
|
public IMemoable Copy()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009E76)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Gost3411Digest::Copy()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:uint8[](var_1_07, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(32)))
|
|
stfld:uint8[](Gost3411Digest::H, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_1_07))
|
|
stloc:uint8[](var_2_16, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(32)))
|
|
stfld:uint8[](Gost3411Digest::L, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_2_16))
|
|
stloc:uint8[](var_3_25, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(32)))
|
|
stfld:uint8[](Gost3411Digest::M, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_3_25))
|
|
stloc:uint8[](var_4_34, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(32)))
|
|
stfld:uint8[](Gost3411Digest::Sum, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_4_34))
|
|
stloc:uint8[][](var_6_46, call:uint8[][](Gost3411Digest::MakeC))
|
|
stfld:uint8[][](Gost3411Digest::C, ldloc:Gost3411Digest(var_0), ldloc:uint8[][](var_6_46))
|
|
stloc:uint8[](var_7_57, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(32)))
|
|
stfld:uint8[](Gost3411Digest::xBuf, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_7_57))
|
|
stloc:Gost28147Engine(var_8_66, newobj:Gost28147Engine(Gost28147Engine::.ctor))
|
|
stfld:IBlockCipher(Gost3411Digest::cipher, ldloc:Gost3411Digest(var_0), ldloc:Gost28147Engine[exp:IBlockCipher](var_8_66))
|
|
stloc:uint8[](var_9_77, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(32)))
|
|
stfld:uint8[](Gost3411Digest::K, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_9_77))
|
|
stloc:uint8[](var_10_87, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(8)))
|
|
stfld:uint8[](Gost3411Digest::a, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_10_87))
|
|
stloc:int16[](var_11_98, newarr:int16[]([mscorlib]System.Int16, ldc.i4:int32(16)))
|
|
stfld:int16[](Gost3411Digest::wS, ldloc:Gost3411Digest(var_0), ldloc:int16[](var_11_98))
|
|
stloc:int16[](var_12_A9, newarr:int16[]([mscorlib]System.Int16, ldc.i4:int32(16)))
|
|
stfld:int16[](Gost3411Digest::w_S, ldloc:Gost3411Digest(var_0), ldloc:int16[](var_12_A9))
|
|
stloc:uint8[](var_13_BA, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(32)))
|
|
stfld:uint8[](Gost3411Digest::S, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_13_BA))
|
|
stloc:uint8[](var_14_CB, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(32)))
|
|
stfld:uint8[](Gost3411Digest::U, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_14_CB))
|
|
stloc:uint8[](var_15_DC, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(32)))
|
|
stfld:uint8[](Gost3411Digest::V, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_15_DC))
|
|
stloc:uint8[](var_16_ED, newarr:uint8[]([mscorlib]System.Byte, ldc.i4:int32(32)))
|
|
stfld:uint8[](Gost3411Digest::W, ldloc:Gost3411Digest(var_0), ldloc:uint8[](var_16_ED))
|
|
call:void(Gost3411Digest::Reset, ldloc:Gost3411Digest(var_0), ldloc:Gost3411Digest[exp:IMemoable](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: 0x06009E77 RID: 40567 RVA: 0x002478AC File Offset: 0x00245AAC
|
|
[Token(Token = "0x6009E77")]
|
|
[Address(RVA = "0x21810B0", Offset = "0x217FAB0", VA = "0x1821810B0", Slot = "12")]
|
|
public void Reset(IMemoable other)
|
|
{
|
|
while (other == 0)
|
|
{
|
|
}
|
|
IBlockCipher blockCipher = this.cipher;
|
|
this.sBox = other;
|
|
this.Reset();
|
|
byte[] l = this.L;
|
|
byte[] l2 = this.L;
|
|
byte[] l3 = this.L;
|
|
byte[] l4 = this.L;
|
|
byte[][] c = this.C;
|
|
byte b = l4[1];
|
|
byte[][] c2 = this.C;
|
|
byte[][] c3 = this.C;
|
|
this.xBufOff = c3;
|
|
this.byteCount = c3;
|
|
}
|
|
|
|
// Token: 0x06009E78 RID: 40568 RVA: 0x00247930 File Offset: 0x00245B30
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x6009E78")]
|
|
[Address(RVA = "0x2181490", Offset = "0x217FE90", VA = "0x182181490")]
|
|
static Gost3411Digest()
|
|
{
|
|
byte[] array = new byte[32];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.CC5B8B6FA17DA57B26C3ACA4DA8B2A477C609D63).FieldHandle);
|
|
Gost3411Digest.C2 = array;
|
|
}
|
|
|
|
// Token: 0x0400682F RID: 26671
|
|
[Token(Token = "0x400682F")]
|
|
private const int DIGEST_LENGTH = 32;
|
|
|
|
// Token: 0x04006830 RID: 26672
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006830")]
|
|
private byte[] H;
|
|
|
|
// Token: 0x04006831 RID: 26673
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006831")]
|
|
private byte[] L;
|
|
|
|
// Token: 0x04006832 RID: 26674
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4006832")]
|
|
private byte[] M;
|
|
|
|
// Token: 0x04006833 RID: 26675
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4006833")]
|
|
private byte[] Sum;
|
|
|
|
// Token: 0x04006834 RID: 26676
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4006834")]
|
|
private byte[][] C;
|
|
|
|
// Token: 0x04006835 RID: 26677
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4006835")]
|
|
private byte[] xBuf;
|
|
|
|
// Token: 0x04006836 RID: 26678
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4006836")]
|
|
private int xBufOff;
|
|
|
|
// Token: 0x04006837 RID: 26679
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x4006837")]
|
|
private ulong byteCount;
|
|
|
|
// Token: 0x04006838 RID: 26680
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4006838")]
|
|
private readonly IBlockCipher cipher;
|
|
|
|
// Token: 0x04006839 RID: 26681
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x4006839")]
|
|
private byte[] sBox;
|
|
|
|
// Token: 0x0400683A RID: 26682
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x400683A")]
|
|
private byte[] K;
|
|
|
|
// Token: 0x0400683B RID: 26683
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x400683B")]
|
|
private byte[] a;
|
|
|
|
// Token: 0x0400683C RID: 26684
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
|
[Token(Token = "0x400683C")]
|
|
internal short[] wS;
|
|
|
|
// Token: 0x0400683D RID: 26685
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
|
|
[Token(Token = "0x400683D")]
|
|
internal short[] w_S;
|
|
|
|
// Token: 0x0400683E RID: 26686
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
|
|
[Token(Token = "0x400683E")]
|
|
internal byte[] S;
|
|
|
|
// Token: 0x0400683F RID: 26687
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x88")]
|
|
[Token(Token = "0x400683F")]
|
|
internal byte[] U;
|
|
|
|
// Token: 0x04006840 RID: 26688
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
|
|
[Token(Token = "0x4006840")]
|
|
internal byte[] V;
|
|
|
|
// Token: 0x04006841 RID: 26689
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x98")]
|
|
[Token(Token = "0x4006841")]
|
|
internal byte[] W;
|
|
|
|
// Token: 0x04006842 RID: 26690
|
|
[Token(Token = "0x4006842")]
|
|
private static readonly byte[] C2;
|
|
}
|
|
}
|