586 lines
21 KiB
C#
586 lines
21 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: 0x02001CE0 RID: 7392
|
|
[Token(Token = "0x2001CE0")]
|
|
public class Blake2bDigest : IDigest
|
|
{
|
|
// Token: 0x0600B9FF RID: 47615 RVA: 0x0029C924 File Offset: 0x0029AB24
|
|
[Token(Token = "0x600B9FF")]
|
|
[Address(RVA = "0x1B30260", Offset = "0x1B2F060", VA = "0x181B30260")]
|
|
public Blake2bDigest()
|
|
{
|
|
this.digestLength = (int)((ulong)64L);
|
|
ulong[] array = new ulong[16];
|
|
this.internalState = array;
|
|
base..ctor();
|
|
byte[] array2 = new byte[128];
|
|
this.buffer = array2;
|
|
this.digestLength = (int)((ulong)64L);
|
|
this.Init();
|
|
}
|
|
|
|
// Token: 0x0600BA00 RID: 47616 RVA: 0x0029C974 File Offset: 0x0029AB74
|
|
[Token(Token = "0x600BA00")]
|
|
[Address(RVA = "0x1B302E0", Offset = "0x1B2F0E0", VA = "0x181B302E0")]
|
|
public Blake2bDigest(Blake2bDigest digest)
|
|
{
|
|
this.digestLength = (int)((ulong)64L);
|
|
ulong[] array = new ulong[16];
|
|
this.internalState = array;
|
|
base..ctor();
|
|
int num = digest.bufferPos;
|
|
this.bufferPos = num;
|
|
byte[] array2 = Arrays.Clone(digest.buffer);
|
|
this.buffer = array2;
|
|
int num2 = digest.keyLength;
|
|
this.keyLength = num2;
|
|
byte[] array3 = Arrays.Clone(digest.key);
|
|
this.key = array3;
|
|
int num3 = digest.digestLength;
|
|
this.digestLength = num3;
|
|
ulong[] array4 = Arrays.Clone(digest.chainValue);
|
|
this.chainValue = array4;
|
|
byte[] array5 = Arrays.Clone(digest.personalization);
|
|
this.personalization = array5;
|
|
byte[] array6 = Arrays.Clone(digest.salt);
|
|
this.salt = array6;
|
|
ulong num4 = digest.t0;
|
|
this.t0 = num4;
|
|
ulong num5 = digest.t1;
|
|
this.t1 = num5;
|
|
ulong num6 = digest.f0;
|
|
this.f0 = num6;
|
|
}
|
|
|
|
// Token: 0x0600BA01 RID: 47617 RVA: 0x0029CA6C File Offset: 0x0029AC6C
|
|
[Token(Token = "0x600BA01")]
|
|
[Address(RVA = "0x1B30180", Offset = "0x1B2EF80", VA = "0x181B30180")]
|
|
public Blake2bDigest(int digestSize)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA01)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Blake2bDigest::.ctor(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_5A:
|
|
stloc:ArgumentException(var_5_64, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("BLAKE2b digest bit length must be a multiple of 8 and not greater than 512")))
|
|
}
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600BA02 RID: 47618 RVA: 0x0029CAE0 File Offset: 0x0029ACE0
|
|
[Token(Token = "0x600BA02")]
|
|
[Address(RVA = "0x1B30060", Offset = "0x1B2EE60", VA = "0x181B30060")]
|
|
public Blake2bDigest(byte[] key)
|
|
{
|
|
this.digestLength = (int)((ulong)64L);
|
|
ulong[] array = new ulong[16];
|
|
this.internalState = array;
|
|
base..ctor();
|
|
byte[] array2 = new byte[128];
|
|
this.buffer = array2;
|
|
if (key != 0)
|
|
{
|
|
byte[] array3 = new byte[key.Length];
|
|
this.key = array3;
|
|
int num = 0;
|
|
int length = key.Length;
|
|
int num2 = 0;
|
|
Array.Copy(key, num2, array3, num, length);
|
|
int length2 = key.Length;
|
|
byte[] array4 = this.buffer;
|
|
int num3 = 0;
|
|
this.keyLength = length2;
|
|
int num4 = 0;
|
|
int length3 = key.Length;
|
|
Array.Copy(key, num4, array4, num3, length3);
|
|
this.bufferPos = (int)((ulong)128L);
|
|
}
|
|
this.digestLength = (int)((ulong)64L);
|
|
this.Init();
|
|
}
|
|
|
|
// Token: 0x0600BA03 RID: 47619 RVA: 0x0029CBAC File Offset: 0x0029ADAC
|
|
[Token(Token = "0x600BA03")]
|
|
[Address(RVA = "0x1B303F0", Offset = "0x1B2F1F0", VA = "0x181B303F0")]
|
|
public Blake2bDigest(byte[] key, int digestLength, byte[] salt, byte[] personalization)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA03)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Blake2bDigest::.ctor(System.Byte[],System.Int32,System.Byte[],System.Byte[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_118:
|
|
stloc:ArgumentException(var_19_122, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("salt length must be exactly 16 bytes")))
|
|
}
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600BA04 RID: 47620 RVA: 0x0029CCDC File Offset: 0x0029AEDC
|
|
[Token(Token = "0x600BA04")]
|
|
[Address(RVA = "0x1B2F720", Offset = "0x1B2E520", VA = "0x181B2F720")]
|
|
private void Init()
|
|
{
|
|
if (this.chainValue == (ulong)0L)
|
|
{
|
|
ulong[] array = new ulong[8];
|
|
this.chainValue = array;
|
|
ulong[] array2 = Blake2bDigest.blake2b_IV;
|
|
int num = this.keyLength;
|
|
array[0] = (ulong)num;
|
|
ulong[] array3 = this.chainValue;
|
|
ulong num2 = Blake2bDigest.blake2b_IV[1];
|
|
array3[1] = num2;
|
|
ulong[] array4 = this.chainValue;
|
|
ulong num3 = Blake2bDigest.blake2b_IV[2];
|
|
array4[2] = num3;
|
|
ulong[] array5 = this.chainValue;
|
|
ulong num4 = Blake2bDigest.blake2b_IV[3];
|
|
array5[3] = num4;
|
|
ulong[] array6 = this.chainValue;
|
|
ulong num5 = Blake2bDigest.blake2b_IV[4];
|
|
array6[4] = num5;
|
|
ulong[] array7 = this.chainValue;
|
|
ulong num6 = Blake2bDigest.blake2b_IV[5];
|
|
array7[5] = num6;
|
|
byte[] array8 = this.salt;
|
|
if (array8 != 0)
|
|
{
|
|
ulong[] array9 = this.chainValue;
|
|
int num7 = 0;
|
|
ulong num8 = Pack.LE_To_UInt64(array8, num7);
|
|
array9[4] = num8;
|
|
ulong[] array10 = this.chainValue;
|
|
ulong num9 = Pack.LE_To_UInt64(this.salt, 8);
|
|
array10[5] = num9;
|
|
}
|
|
ulong[] array11 = this.chainValue;
|
|
ulong num10 = Blake2bDigest.blake2b_IV[6];
|
|
array11[6] = num10;
|
|
ulong[] array12 = this.chainValue;
|
|
ulong num11 = Blake2bDigest.blake2b_IV[7];
|
|
array12[7] = num11;
|
|
byte[] array13 = this.personalization;
|
|
if (array13 != 0)
|
|
{
|
|
ulong[] array14 = this.chainValue;
|
|
int num12 = 0;
|
|
ulong num13 = Pack.LE_To_UInt64(array13, num12);
|
|
array14[6] = num13;
|
|
ulong[] array15 = this.chainValue;
|
|
ulong num14 = Pack.LE_To_UInt64(this.personalization, 8);
|
|
array15[7] = num14;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA05 RID: 47621 RVA: 0x0029CE94 File Offset: 0x0029B094
|
|
[Token(Token = "0x600BA05")]
|
|
[Address(RVA = "0x1B2FC00", Offset = "0x1B2EA00", VA = "0x181B2FC00")]
|
|
private void InitializeInternalState()
|
|
{
|
|
ulong[] array = this.chainValue;
|
|
int length = array.Length;
|
|
int num = 0;
|
|
ulong[] array2 = this.internalState;
|
|
int num2 = 0;
|
|
Array.Copy(array, num2, array2, num, length);
|
|
ulong[] array3 = this.chainValue;
|
|
int num3 = 0;
|
|
int length2 = array3.Length;
|
|
ulong[] array4 = this.internalState;
|
|
ulong num4;
|
|
Array.Copy(Blake2bDigest.blake2b_IV, num3, array4, length2, (int)num4);
|
|
ulong[] array5 = this.internalState;
|
|
ulong num5 = Blake2bDigest.blake2b_IV[4];
|
|
array5[12] = num5;
|
|
ulong[] array6 = this.internalState;
|
|
ulong num6 = Blake2bDigest.blake2b_IV[5];
|
|
array6[13] = num6;
|
|
ulong[] array7 = this.internalState;
|
|
ulong num7 = Blake2bDigest.blake2b_IV[6];
|
|
array7[14] = num7;
|
|
ulong[] array8 = this.internalState;
|
|
ulong num8 = Blake2bDigest.blake2b_IV[7];
|
|
array8[15] = num8;
|
|
}
|
|
|
|
// Token: 0x0600BA06 RID: 47622 RVA: 0x0029CF7C File Offset: 0x0029B17C
|
|
[Token(Token = "0x600BA06")]
|
|
[Address(RVA = "0x1B2FEF0", Offset = "0x1B2ECF0", VA = "0x181B2FEF0", Slot = "11")]
|
|
public virtual void Update(byte b)
|
|
{
|
|
int num = this.bufferPos;
|
|
uint num2;
|
|
byte[] array;
|
|
if (num2 != (uint)num)
|
|
{
|
|
array = this.buffer;
|
|
return;
|
|
}
|
|
if (num == array.Length)
|
|
{
|
|
}
|
|
byte[] array2 = this.buffer;
|
|
int num3 = 0;
|
|
this.Compress(array2, num3);
|
|
byte[] array3 = this.buffer;
|
|
int length = array3.Length;
|
|
int num4 = 0;
|
|
Array.Clear(array3, num4, length);
|
|
this.buffer[0] = b;
|
|
this.bufferPos = (int)((ulong)1L);
|
|
}
|
|
|
|
// Token: 0x0600BA07 RID: 47623 RVA: 0x0029CFF4 File Offset: 0x0029B1F4
|
|
[Token(Token = "0x600BA07")]
|
|
[Address(RVA = "0x1B2E7F0", Offset = "0x1B2D5F0", VA = "0x181B2E7F0", Slot = "12")]
|
|
public virtual void BlockUpdate(byte[] message, int offset, int len)
|
|
{
|
|
if (message != 0 && len != 0)
|
|
{
|
|
int num = this.bufferPos;
|
|
int num2 = 0;
|
|
if (num != 0)
|
|
{
|
|
byte[] array = this.buffer;
|
|
uint num3;
|
|
num3 -= (uint)num;
|
|
Array.Copy(message, offset, array, num, len);
|
|
Array.Copy(message, offset, array, num, (int)num3);
|
|
if (num3 == (uint)len)
|
|
{
|
|
}
|
|
byte[] array2 = this.buffer;
|
|
int num4 = 0;
|
|
this.Compress(array2, num4);
|
|
byte[] array3 = this.buffer;
|
|
this.bufferPos = num2;
|
|
int length = array3.Length;
|
|
int num5 = 0;
|
|
Array.Clear(array3, num5, length);
|
|
}
|
|
num2 += offset;
|
|
this.Compress(message, num2);
|
|
byte[] array4 = this.buffer;
|
|
int num6 = 0;
|
|
Array.Copy(message, num2, array4, num6, offset);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA08 RID: 47624 RVA: 0x0029D0A4 File Offset: 0x0029B2A4
|
|
[Token(Token = "0x600BA08")]
|
|
[Address(RVA = "0x1B2F160", Offset = "0x1B2DF60", VA = "0x181B2F160", Slot = "13")]
|
|
public virtual int DoFinal(byte[] output, int outOffset)
|
|
{
|
|
int num = this.bufferPos;
|
|
this.f0 = (ulong)(-1L);
|
|
this.t0 = (ulong)num;
|
|
if (num <= 0 || num == 0)
|
|
{
|
|
}
|
|
byte[] array = this.buffer;
|
|
int num2 = 0;
|
|
this.Compress(array, num2);
|
|
byte[] array2 = this.buffer;
|
|
int length = array2.Length;
|
|
int num3 = 0;
|
|
Array.Clear(array2, num3, length);
|
|
ulong[] array3 = this.internalState;
|
|
int length2 = array3.Length;
|
|
int num4 = 0;
|
|
Array.Clear(array3, num4, length2);
|
|
ulong[] array4 = this.chainValue;
|
|
int num5 = 0;
|
|
ulong[] array6;
|
|
if (num5 < array4.Length && num5 < this.digestLength)
|
|
{
|
|
byte[] array5 = Pack.UInt64_To_LE(array4[num5]);
|
|
int num6 = this.digestLength;
|
|
num6 -= num5;
|
|
int num7 = 0;
|
|
uint num8;
|
|
Array.Copy(array5, num7, output, 0, (int)num8);
|
|
array6 = this.chainValue;
|
|
num5++;
|
|
num5 += 8;
|
|
}
|
|
int length3 = array6.Length;
|
|
int num9 = 0;
|
|
Array.Clear(array6, num9, length3);
|
|
return this.digestLength;
|
|
}
|
|
|
|
// Token: 0x0600BA09 RID: 47625 RVA: 0x0029D1A4 File Offset: 0x0029B3A4
|
|
[Token(Token = "0x600BA09")]
|
|
[Address(RVA = "0x1B2FE50", Offset = "0x1B2EC50", VA = "0x181B2FE50", Slot = "14")]
|
|
public virtual void Reset()
|
|
{
|
|
int num = 0;
|
|
this.bufferPos = num;
|
|
this.f0 = (ulong)num;
|
|
this.t0 = (ulong)num;
|
|
this.t1 = (ulong)num;
|
|
this.chainValue = num;
|
|
byte[] array = this.buffer;
|
|
int length = array.Length;
|
|
int num2 = 0;
|
|
Array.Clear(array, num2, length);
|
|
byte[] array2 = this.key;
|
|
if (array2 != 0)
|
|
{
|
|
int length2 = array2.Length;
|
|
int num3 = 0;
|
|
byte[] array3 = this.buffer;
|
|
int num4 = 0;
|
|
Array.Copy(array2, num4, array3, num3, length2);
|
|
this.bufferPos = (int)((ulong)128L);
|
|
}
|
|
this.Init();
|
|
}
|
|
|
|
// Token: 0x0600BA0A RID: 47626 RVA: 0x0029D23C File Offset: 0x0029B43C
|
|
[Token(Token = "0x600BA0A")]
|
|
[Address(RVA = "0x1B2E9B0", Offset = "0x1B2D7B0", VA = "0x181B2E9B0")]
|
|
private void Compress(byte[] message, int messagePos)
|
|
{
|
|
this.InitializeInternalState();
|
|
ulong[] array = new ulong[16];
|
|
int num = 0;
|
|
ulong num2 = Pack.LE_To_UInt64(message, messagePos);
|
|
num++;
|
|
array[0] = num2;
|
|
byte[,] array2 = Blake2bDigest.blake2b_sigma;
|
|
throw new IndexOutOfRangeException();
|
|
}
|
|
|
|
// Token: 0x0600BA0B RID: 47627 RVA: 0x0029D4A8 File Offset: 0x0029B6A8
|
|
[Token(Token = "0x600BA0B")]
|
|
[Address(RVA = "0x1B2F2E0", Offset = "0x1B2E0E0", VA = "0x181B2F2E0")]
|
|
private void G(ulong m1, ulong m2, int posA, int posB, int posC, int posD)
|
|
{
|
|
ulong[] array = this.internalState;
|
|
int length = array.Length;
|
|
ulong num;
|
|
ulong num2;
|
|
num += num2;
|
|
num += m1;
|
|
int length2 = this.internalState.Length;
|
|
ulong num3;
|
|
array.m_value = num3;
|
|
ulong[] array2 = this.internalState;
|
|
int length3 = array2.Length;
|
|
ulong num4;
|
|
ulong num5;
|
|
num4 += num5;
|
|
array2[0] = num4;
|
|
int length4 = this.internalState.Length;
|
|
int length5 = this.internalState.Length;
|
|
ulong num6;
|
|
ulong num7;
|
|
num6 += num7;
|
|
int length6 = this.internalState.Length;
|
|
ulong num8;
|
|
array.m_value = num8;
|
|
ulong[] array3 = this.internalState;
|
|
int length7 = array3.Length;
|
|
ulong num9;
|
|
ulong num10;
|
|
num9 += num10;
|
|
array3[0] = num9;
|
|
int length8 = this.internalState.Length;
|
|
ulong num11;
|
|
num11 += num11;
|
|
}
|
|
|
|
// Token: 0x0600BA0C RID: 47628 RVA: 0x0029D574 File Offset: 0x0029B774
|
|
[Token(Token = "0x600BA0C")]
|
|
[Address(RVA = "0x1B2FED0", Offset = "0x1B2ECD0", VA = "0x181B2FED0")]
|
|
private static ulong Rotr64(ulong x, int rot)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x17001D08 RID: 7432
|
|
// (get) Token: 0x0600BA0D RID: 47629 RVA: 0x0029D584 File Offset: 0x0029B784
|
|
[Token(Token = "0x17001D08")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600BA0D")]
|
|
[Address(RVA = "0x1B30650", Offset = "0x1B2F450", VA = "0x181B30650", Slot = "15")]
|
|
get
|
|
{
|
|
return "BLAKE2b";
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA0E RID: 47630 RVA: 0x0029D598 File Offset: 0x0029B798
|
|
[Token(Token = "0x600BA0E")]
|
|
[Address(RVA = "0x3FA560", Offset = "0x3F9360", VA = "0x1803FA560", Slot = "16")]
|
|
public virtual int GetDigestSize()
|
|
{
|
|
return this.digestLength;
|
|
}
|
|
|
|
// Token: 0x0600BA0F RID: 47631 RVA: 0x0029D5AC File Offset: 0x0029B7AC
|
|
[Token(Token = "0x600BA0F")]
|
|
[Address(RVA = "0x1B2F710", Offset = "0x1B2E510", VA = "0x181B2F710", Slot = "17")]
|
|
public virtual int GetByteLength()
|
|
{
|
|
return 128;
|
|
}
|
|
|
|
// Token: 0x0600BA10 RID: 47632 RVA: 0x0029D5C0 File Offset: 0x0029B7C0
|
|
[Token(Token = "0x600BA10")]
|
|
[Address(RVA = "0x1B2E940", Offset = "0x1B2D740", VA = "0x181B2E940", Slot = "18")]
|
|
public virtual void ClearKey()
|
|
{
|
|
byte[] array = this.key;
|
|
if (array != 0)
|
|
{
|
|
int length = array.Length;
|
|
int num = 0;
|
|
Array.Clear(array, num, length);
|
|
byte[] array2 = this.buffer;
|
|
int length2 = array2.Length;
|
|
int num2 = 0;
|
|
Array.Clear(array2, num2, length2);
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA11 RID: 47633 RVA: 0x0029D60C File Offset: 0x0029B80C
|
|
[Token(Token = "0x600BA11")]
|
|
[Address(RVA = "0x1B2E990", Offset = "0x1B2D790", VA = "0x181B2E990", Slot = "19")]
|
|
public virtual void ClearSalt()
|
|
{
|
|
byte[] array = this.salt;
|
|
if (array != 0)
|
|
{
|
|
int length = array.Length;
|
|
int num = 0;
|
|
Array.Clear(array, num, length);
|
|
return;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA12 RID: 47634 RVA: 0x0029D638 File Offset: 0x0029B838
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x600BA12")]
|
|
[Address(RVA = "0x1B2FFB0", Offset = "0x1B2EDB0", VA = "0x181B2FFB0")]
|
|
static Blake2bDigest()
|
|
{
|
|
ulong[] array = new ulong[8];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.22F13A28C218AA9B43303043F2CF664790D12BD7).FieldHandle);
|
|
Blake2bDigest.blake2b_IV = array;
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.DB8FE39060DF4E7BC9CC190D08EFF78F0C61F289).FieldHandle);
|
|
Blake2bDigest.blake2b_sigma = array;
|
|
}
|
|
|
|
// Token: 0x04007640 RID: 30272
|
|
[Token(Token = "0x4007640")]
|
|
private static readonly ulong[] blake2b_IV;
|
|
|
|
// Token: 0x04007641 RID: 30273
|
|
[Token(Token = "0x4007641")]
|
|
private static readonly byte[,] blake2b_sigma;
|
|
|
|
// Token: 0x04007642 RID: 30274
|
|
[Token(Token = "0x4007642")]
|
|
private const int ROUNDS = 12;
|
|
|
|
// Token: 0x04007643 RID: 30275
|
|
[Token(Token = "0x4007643")]
|
|
private const int BLOCK_LENGTH_BYTES = 128;
|
|
|
|
// Token: 0x04007644 RID: 30276
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007644")]
|
|
private int digestLength;
|
|
|
|
// Token: 0x04007645 RID: 30277
|
|
[FieldOffset(Offset = "0x14")]
|
|
[Token(Token = "0x4007645")]
|
|
private int keyLength;
|
|
|
|
// Token: 0x04007646 RID: 30278
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007646")]
|
|
private byte[] salt;
|
|
|
|
// Token: 0x04007647 RID: 30279
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007647")]
|
|
private byte[] personalization;
|
|
|
|
// Token: 0x04007648 RID: 30280
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4007648")]
|
|
private byte[] key;
|
|
|
|
// Token: 0x04007649 RID: 30281
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4007649")]
|
|
private byte[] buffer;
|
|
|
|
// Token: 0x0400764A RID: 30282
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x400764A")]
|
|
private int bufferPos;
|
|
|
|
// Token: 0x0400764B RID: 30283
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400764B")]
|
|
private ulong[] internalState;
|
|
|
|
// Token: 0x0400764C RID: 30284
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400764C")]
|
|
private ulong[] chainValue;
|
|
|
|
// Token: 0x0400764D RID: 30285
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x400764D")]
|
|
private ulong t0;
|
|
|
|
// Token: 0x0400764E RID: 30286
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x400764E")]
|
|
private ulong t1;
|
|
|
|
// Token: 0x0400764F RID: 30287
|
|
[FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x400764F")]
|
|
private ulong f0;
|
|
}
|
|
}
|