574 lines
21 KiB
C#
574 lines
21 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.Serialization.Formatters.Binary;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
|
|
{
|
|
// Token: 0x02001CE1 RID: 7393
|
|
[Token(Token = "0x2001CE1")]
|
|
public class Blake2sDigest : IDigest
|
|
{
|
|
// Token: 0x0600BA13 RID: 47635 RVA: 0x0029D670 File Offset: 0x0029B870
|
|
[Token(Token = "0x600BA13")]
|
|
[Address(RVA = "0x1B32280", Offset = "0x1B31080", VA = "0x181B32280")]
|
|
public Blake2sDigest()
|
|
{
|
|
this.digestLength = (int)((ulong)32L);
|
|
uint[] array = new uint[16];
|
|
this.internalState = array;
|
|
base..ctor();
|
|
byte[] array2 = new byte[64];
|
|
this.buffer = array2;
|
|
this.digestLength = (int)((ulong)32L);
|
|
this.Init();
|
|
}
|
|
|
|
// Token: 0x0600BA14 RID: 47636 RVA: 0x0029D6BC File Offset: 0x0029B8BC
|
|
[Token(Token = "0x600BA14")]
|
|
[Address(RVA = "0x1B31D30", Offset = "0x1B30B30", VA = "0x181B31D30")]
|
|
public Blake2sDigest(Blake2sDigest digest)
|
|
{
|
|
this.digestLength = (int)((ulong)32L);
|
|
uint[] array = new uint[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;
|
|
uint[] array4 = Arrays.Clone(digest.chainValue);
|
|
this.chainValue = array4;
|
|
byte[] array5 = Arrays.Clone(digest.personalization);
|
|
this.personalization = array5;
|
|
}
|
|
|
|
// Token: 0x0600BA15 RID: 47637 RVA: 0x0029D76C File Offset: 0x0029B96C
|
|
[Token(Token = "0x600BA15")]
|
|
[Address(RVA = "0x1B31F40", Offset = "0x1B30D40", VA = "0x181B31F40")]
|
|
public Blake2sDigest(int digestBits)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA15)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Blake2sDigest::.ctor(System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_57:
|
|
stloc:ArgumentException(var_5_61, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("BLAKE2s digest bit length must be a multiple of 8 and not greater than 256")))
|
|
}
|
|
|
|
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: 0x0600BA16 RID: 47638 RVA: 0x0029D7DC File Offset: 0x0029B9DC
|
|
[Token(Token = "0x600BA16")]
|
|
[Address(RVA = "0x1B31E20", Offset = "0x1B30C20", VA = "0x181B31E20")]
|
|
public Blake2sDigest(byte[] key)
|
|
{
|
|
this.digestLength = (int)((ulong)32L);
|
|
uint[] array = new uint[16];
|
|
this.internalState = array;
|
|
base..ctor();
|
|
byte[] array2 = new byte[64];
|
|
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;
|
|
int num3 = 0;
|
|
byte[] array4 = this.buffer;
|
|
int num4 = 0;
|
|
this.keyLength = length2;
|
|
int length3 = key.Length;
|
|
Array.Copy(key, num4, array4, num3, length3);
|
|
this.bufferPos = (int)((ulong)64L);
|
|
}
|
|
this.digestLength = (int)((ulong)32L);
|
|
this.Init();
|
|
}
|
|
|
|
// Token: 0x0600BA17 RID: 47639 RVA: 0x0029D8A4 File Offset: 0x0029BAA4
|
|
[Token(Token = "0x600BA17")]
|
|
[Address(RVA = "0x1B32020", Offset = "0x1B30E20", VA = "0x181B32020")]
|
|
public Blake2sDigest(byte[] key, int digestBytes, byte[] salt, byte[] personalization)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600BA17)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.Blake2sDigest::.ctor(System.Byte[],System.Int32,System.Byte[],System.Byte[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_110:
|
|
stloc:ArgumentException(var_19_11A, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Salt length must be exactly 8 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: 0x0600BA18 RID: 47640 RVA: 0x0029D9CC File Offset: 0x0029BBCC
|
|
[Token(Token = "0x600BA18")]
|
|
[Address(RVA = "0x1B31450", Offset = "0x1B30250", VA = "0x181B31450")]
|
|
private void Init()
|
|
{
|
|
if (this.chainValue == (ulong)0L)
|
|
{
|
|
uint[] array = new uint[8];
|
|
this.chainValue = array;
|
|
uint[] array2 = Blake2sDigest.blake2s_IV;
|
|
int num = this.keyLength;
|
|
array[0] = (uint)num;
|
|
uint[] array3 = this.chainValue;
|
|
uint num2 = Blake2sDigest.blake2s_IV[0];
|
|
array3[0] = num2;
|
|
uint[] array4 = this.chainValue;
|
|
uint num3 = Blake2sDigest.blake2s_IV[1];
|
|
array4[1] = num3;
|
|
uint[] array5 = this.chainValue;
|
|
uint num4 = Blake2sDigest.blake2s_IV[1];
|
|
array5[1] = num4;
|
|
uint[] array6 = this.chainValue;
|
|
uint num5 = Blake2sDigest.blake2s_IV[2];
|
|
array6[2] = num5;
|
|
uint[] array7 = this.chainValue;
|
|
uint num6 = Blake2sDigest.blake2s_IV[2];
|
|
array7[2] = num6;
|
|
byte[] array8 = this.salt;
|
|
if (array8 != 0)
|
|
{
|
|
uint[] array9 = this.chainValue;
|
|
int num7 = 0;
|
|
int @int = SerializationHeaderRecord.GetInt32(array8, num7);
|
|
array9[2] = (uint)@int;
|
|
uint[] array10 = this.chainValue;
|
|
int int2 = SerializationHeaderRecord.GetInt32(this.salt, 4);
|
|
array10[2] = (uint)int2;
|
|
}
|
|
uint[] array11 = this.chainValue;
|
|
uint num8 = Blake2sDigest.blake2s_IV[3];
|
|
array11[3] = num8;
|
|
uint[] array12 = this.chainValue;
|
|
uint num9 = Blake2sDigest.blake2s_IV[3];
|
|
array12[3] = num9;
|
|
byte[] array13 = this.personalization;
|
|
if (array13 != 0)
|
|
{
|
|
uint[] array14 = this.chainValue;
|
|
int num10 = 0;
|
|
int int3 = SerializationHeaderRecord.GetInt32(array13, num10);
|
|
array14[3] = (uint)int3;
|
|
uint[] array15 = this.chainValue;
|
|
int int4 = SerializationHeaderRecord.GetInt32(this.personalization, 4);
|
|
array15[3] = (uint)int4;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA19 RID: 47641 RVA: 0x0029DB84 File Offset: 0x0029BD84
|
|
[Token(Token = "0x600BA19")]
|
|
[Address(RVA = "0x1B31910", Offset = "0x1B30710", VA = "0x181B31910")]
|
|
private void InitializeInternalState()
|
|
{
|
|
uint[] array = this.chainValue;
|
|
int length = array.Length;
|
|
int num = 0;
|
|
uint[] array2 = this.internalState;
|
|
int num2 = 0;
|
|
Array.Copy(array, num2, array2, num, length);
|
|
uint[] array3 = this.chainValue;
|
|
int num3 = 0;
|
|
int length2 = array3.Length;
|
|
uint[] array4 = this.internalState;
|
|
ulong num4;
|
|
Array.Copy(Blake2sDigest.blake2s_IV, num3, array4, length2, (int)num4);
|
|
uint[] array5 = this.internalState;
|
|
uint num5 = Blake2sDigest.blake2s_IV[2];
|
|
array5[6] = num5;
|
|
uint[] array6 = this.internalState;
|
|
uint num6 = Blake2sDigest.blake2s_IV[2];
|
|
array6[6] = num6;
|
|
uint[] array7 = this.internalState;
|
|
uint num7 = Blake2sDigest.blake2s_IV[3];
|
|
array7[7] = num7;
|
|
uint[] array8 = this.internalState;
|
|
uint num8 = Blake2sDigest.blake2s_IV[3];
|
|
array8[7] = num8;
|
|
}
|
|
|
|
// Token: 0x0600BA1A RID: 47642 RVA: 0x0029DC68 File Offset: 0x0029BE68
|
|
[Token(Token = "0x600BA1A")]
|
|
[Address(RVA = "0x1B31BC0", Offset = "0x1B309C0", VA = "0x181B31BC0", 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: 0x0600BA1B RID: 47643 RVA: 0x0029DCE0 File Offset: 0x0029BEE0
|
|
[Token(Token = "0x600BA1B")]
|
|
[Address(RVA = "0x1B30680", Offset = "0x1B2F480", VA = "0x181B30680", 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);
|
|
num2 += 64;
|
|
byte[] array4 = this.buffer;
|
|
int num6 = 0;
|
|
Array.Copy(message, num2, array4, num6, offset);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA1C RID: 47644 RVA: 0x0029DD94 File Offset: 0x0029BF94
|
|
[Token(Token = "0x600BA1C")]
|
|
[Address(RVA = "0x1B30F50", Offset = "0x1B2FD50", VA = "0x181B30F50", Slot = "13")]
|
|
public virtual int DoFinal(byte[] output, int outOffset)
|
|
{
|
|
this.f0 = (uint)((ulong)4294967295L);
|
|
byte[] array = this.buffer;
|
|
int num = 0;
|
|
this.Compress(array, num);
|
|
byte[] array2 = this.buffer;
|
|
int length = array2.Length;
|
|
int num2 = 0;
|
|
Array.Clear(array2, num2, length);
|
|
uint[] array3 = this.internalState;
|
|
int length2 = array3.Length;
|
|
int num3 = 0;
|
|
Array.Clear(array3, num3, length2);
|
|
uint[] array4 = this.chainValue;
|
|
int num4 = 0;
|
|
uint[] array6;
|
|
if (num4 < array4.Length && num4 < this.digestLength)
|
|
{
|
|
byte[] array5 = Pack.UInt32_To_LE(array4[num4]);
|
|
int num5 = this.digestLength;
|
|
num5 -= num4;
|
|
int num6 = 0;
|
|
uint num7;
|
|
Array.Copy(array5, num6, output, 0, (int)num7);
|
|
array6 = this.chainValue;
|
|
num4++;
|
|
num4 += 4;
|
|
}
|
|
int length3 = array6.Length;
|
|
int num8 = 0;
|
|
Array.Clear(array6, num8, length3);
|
|
return this.digestLength;
|
|
}
|
|
|
|
// Token: 0x0600BA1D RID: 47645 RVA: 0x0029DE84 File Offset: 0x0029C084
|
|
[Token(Token = "0x600BA1D")]
|
|
[Address(RVA = "0x1B31B40", Offset = "0x1B30940", VA = "0x181B31B40", Slot = "14")]
|
|
public virtual void Reset()
|
|
{
|
|
int num = 0;
|
|
this.bufferPos = num;
|
|
this.t1 = (uint)num;
|
|
this.t0 = (uint)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)64L);
|
|
}
|
|
this.Init();
|
|
}
|
|
|
|
// Token: 0x0600BA1E RID: 47646 RVA: 0x0029DF10 File Offset: 0x0029C110
|
|
[Token(Token = "0x600BA1E")]
|
|
[Address(RVA = "0x1B307C0", Offset = "0x1B2F5C0", VA = "0x181B307C0")]
|
|
private void Compress(byte[] message, int messagePos)
|
|
{
|
|
this.InitializeInternalState();
|
|
uint[] array = new uint[16];
|
|
int num = 0;
|
|
num++;
|
|
array[0] = array;
|
|
byte[,] array2 = Blake2sDigest.blake2s_sigma;
|
|
throw new IndexOutOfRangeException();
|
|
}
|
|
|
|
// Token: 0x0600BA1F RID: 47647 RVA: 0x0029E178 File Offset: 0x0029C378
|
|
[Token(Token = "0x600BA1F")]
|
|
[Address(RVA = "0x1B310B0", Offset = "0x1B2FEB0", VA = "0x181B310B0")]
|
|
private void G(uint m1, uint m2, int posA, int posB, int posC, int posD)
|
|
{
|
|
uint[] array = this.internalState;
|
|
int length = array.Length;
|
|
uint num;
|
|
uint num2;
|
|
num += num2;
|
|
num += m1;
|
|
posA.m_value = (int)num;
|
|
int length2 = this.internalState.Length;
|
|
uint num3;
|
|
array.m_value = num3;
|
|
uint[] array2 = this.internalState;
|
|
int length3 = array2.Length;
|
|
uint num4;
|
|
uint num5;
|
|
num4 += num5;
|
|
array2[0] = num4;
|
|
int length4 = this.internalState.Length;
|
|
int length5 = this.internalState.Length;
|
|
uint num6;
|
|
uint num7;
|
|
num6 += num7;
|
|
num6 += m2;
|
|
posA.m_value = (int)num6;
|
|
int length6 = this.internalState.Length;
|
|
uint num8;
|
|
array.m_value = num8;
|
|
uint[] array3 = this.internalState;
|
|
int length7 = array3.Length;
|
|
uint num9;
|
|
uint num10;
|
|
num9 += num10;
|
|
array3[0] = num9;
|
|
int length8 = this.internalState.Length;
|
|
}
|
|
|
|
// Token: 0x0600BA20 RID: 47648 RVA: 0x0029E254 File Offset: 0x0029C454
|
|
[Token(Token = "0x600BA20")]
|
|
[Address(RVA = "0x1B32330", Offset = "0x1B31130", VA = "0x181B32330")]
|
|
private uint rotr32(uint x, int rot)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
// Token: 0x17001D09 RID: 7433
|
|
// (get) Token: 0x0600BA21 RID: 47649 RVA: 0x0029E264 File Offset: 0x0029C464
|
|
[Token(Token = "0x17001D09")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600BA21")]
|
|
[Address(RVA = "0x1B32300", Offset = "0x1B31100", VA = "0x181B32300", Slot = "15")]
|
|
get
|
|
{
|
|
return "BLAKE2s";
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600BA22 RID: 47650 RVA: 0x0029E278 File Offset: 0x0029C478
|
|
[Token(Token = "0x600BA22")]
|
|
[Address(RVA = "0x3FA560", Offset = "0x3F9360", VA = "0x1803FA560", Slot = "16")]
|
|
public virtual int GetDigestSize()
|
|
{
|
|
return this.digestLength;
|
|
}
|
|
|
|
// Token: 0x0600BA23 RID: 47651 RVA: 0x0029E28C File Offset: 0x0029C48C
|
|
[Token(Token = "0x600BA23")]
|
|
[Address(RVA = "0x1B31440", Offset = "0x1B30240", VA = "0x181B31440", Slot = "17")]
|
|
public virtual int GetByteLength()
|
|
{
|
|
return 64;
|
|
}
|
|
|
|
// Token: 0x0600BA24 RID: 47652 RVA: 0x0029E29C File Offset: 0x0029C49C
|
|
[Token(Token = "0x600BA24")]
|
|
[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: 0x0600BA25 RID: 47653 RVA: 0x0029E2E8 File Offset: 0x0029C4E8
|
|
[Token(Token = "0x600BA25")]
|
|
[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: 0x0600BA26 RID: 47654 RVA: 0x0029E314 File Offset: 0x0029C514
|
|
// Note: this type is marked as 'beforefieldinit'.
|
|
[Token(Token = "0x600BA26")]
|
|
[Address(RVA = "0x1B31C80", Offset = "0x1B30A80", VA = "0x181B31C80")]
|
|
static Blake2sDigest()
|
|
{
|
|
uint[] array = new uint[8];
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.013B76F7DD3E0346CB351F079CC062EFBD293457).FieldHandle);
|
|
Blake2sDigest.blake2s_IV = array;
|
|
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.7F817443C1F736721DD92BD67C7C8994C7B8DEBF).FieldHandle);
|
|
Blake2sDigest.blake2s_sigma = array;
|
|
}
|
|
|
|
// Token: 0x04007650 RID: 30288
|
|
[Token(Token = "0x4007650")]
|
|
private static readonly uint[] blake2s_IV;
|
|
|
|
// Token: 0x04007651 RID: 30289
|
|
[Token(Token = "0x4007651")]
|
|
private static readonly byte[,] blake2s_sigma;
|
|
|
|
// Token: 0x04007652 RID: 30290
|
|
[Token(Token = "0x4007652")]
|
|
private const int ROUNDS = 10;
|
|
|
|
// Token: 0x04007653 RID: 30291
|
|
[Token(Token = "0x4007653")]
|
|
private const int BLOCK_LENGTH_BYTES = 64;
|
|
|
|
// Token: 0x04007654 RID: 30292
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007654")]
|
|
private int digestLength;
|
|
|
|
// Token: 0x04007655 RID: 30293
|
|
[FieldOffset(Offset = "0x14")]
|
|
[Token(Token = "0x4007655")]
|
|
private int keyLength;
|
|
|
|
// Token: 0x04007656 RID: 30294
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007656")]
|
|
private byte[] salt;
|
|
|
|
// Token: 0x04007657 RID: 30295
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007657")]
|
|
private byte[] personalization;
|
|
|
|
// Token: 0x04007658 RID: 30296
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4007658")]
|
|
private byte[] key;
|
|
|
|
// Token: 0x04007659 RID: 30297
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4007659")]
|
|
private byte[] buffer;
|
|
|
|
// Token: 0x0400765A RID: 30298
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x400765A")]
|
|
private int bufferPos;
|
|
|
|
// Token: 0x0400765B RID: 30299
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400765B")]
|
|
private uint[] internalState;
|
|
|
|
// Token: 0x0400765C RID: 30300
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x400765C")]
|
|
private uint[] chainValue;
|
|
|
|
// Token: 0x0400765D RID: 30301
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x400765D")]
|
|
private uint t0;
|
|
|
|
// Token: 0x0400765E RID: 30302
|
|
[FieldOffset(Offset = "0x54")]
|
|
[Token(Token = "0x400765E")]
|
|
private uint t1;
|
|
|
|
// Token: 0x0400765F RID: 30303
|
|
[FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x400765F")]
|
|
private uint f0;
|
|
}
|
|
}
|