m
This commit is contained in:
+573
@@ -0,0 +1,573 @@
|
||||
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: 0x02001DC1 RID: 7617
|
||||
[Token(Token = "0x2001DC1")]
|
||||
public class Blake2sDigest : IDigest
|
||||
{
|
||||
// Token: 0x0600BDE1 RID: 48609 RVA: 0x002A6018 File Offset: 0x002A4218
|
||||
[Token(Token = "0x600BDE1")]
|
||||
[Address(RVA = "0x2599DF0", Offset = "0x2598DF0", VA = "0x182599DF0")]
|
||||
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: 0x0600BDE2 RID: 48610 RVA: 0x002A6064 File Offset: 0x002A4264
|
||||
[Token(Token = "0x600BDE2")]
|
||||
[Address(RVA = "0x25998A0", Offset = "0x25988A0", VA = "0x1825998A0")]
|
||||
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: 0x0600BDE3 RID: 48611 RVA: 0x002A6114 File Offset: 0x002A4314
|
||||
[Token(Token = "0x600BDE3")]
|
||||
[Address(RVA = "0x2599AB0", Offset = "0x2598AB0", VA = "0x182599AB0")]
|
||||
public Blake2sDigest(int digestBits)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600BDE3)
|
||||
|
||||
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 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600BDE4 RID: 48612 RVA: 0x002A6184 File Offset: 0x002A4384
|
||||
[Token(Token = "0x600BDE4")]
|
||||
[Address(RVA = "0x2599990", Offset = "0x2598990", VA = "0x182599990")]
|
||||
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: 0x0600BDE5 RID: 48613 RVA: 0x002A624C File Offset: 0x002A444C
|
||||
[Token(Token = "0x600BDE5")]
|
||||
[Address(RVA = "0x2599B90", Offset = "0x2598B90", VA = "0x182599B90")]
|
||||
public Blake2sDigest(byte[] key, int digestBytes, byte[] salt, byte[] personalization)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600BDE5)
|
||||
|
||||
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 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600BDE6 RID: 48614 RVA: 0x002A6374 File Offset: 0x002A4574
|
||||
[Token(Token = "0x600BDE6")]
|
||||
[Address(RVA = "0x2598FC0", Offset = "0x2597FC0", VA = "0x182598FC0")]
|
||||
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: 0x0600BDE7 RID: 48615 RVA: 0x002A652C File Offset: 0x002A472C
|
||||
[Token(Token = "0x600BDE7")]
|
||||
[Address(RVA = "0x2599480", Offset = "0x2598480", VA = "0x182599480")]
|
||||
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: 0x0600BDE8 RID: 48616 RVA: 0x002A6610 File Offset: 0x002A4810
|
||||
[Token(Token = "0x600BDE8")]
|
||||
[Address(RVA = "0x2599730", Offset = "0x2598730", VA = "0x182599730", 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: 0x0600BDE9 RID: 48617 RVA: 0x002A6688 File Offset: 0x002A4888
|
||||
[Token(Token = "0x600BDE9")]
|
||||
[Address(RVA = "0x2598200", Offset = "0x2597200", VA = "0x182598200", 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: 0x0600BDEA RID: 48618 RVA: 0x002A673C File Offset: 0x002A493C
|
||||
[Token(Token = "0x600BDEA")]
|
||||
[Address(RVA = "0x2598AD0", Offset = "0x2597AD0", VA = "0x182598AD0", 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: 0x0600BDEB RID: 48619 RVA: 0x002A682C File Offset: 0x002A4A2C
|
||||
[Token(Token = "0x600BDEB")]
|
||||
[Address(RVA = "0x25996B0", Offset = "0x25986B0", VA = "0x1825996B0", 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: 0x0600BDEC RID: 48620 RVA: 0x002A68B8 File Offset: 0x002A4AB8
|
||||
[Token(Token = "0x600BDEC")]
|
||||
[Address(RVA = "0x2598340", Offset = "0x2597340", VA = "0x182598340")]
|
||||
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: 0x0600BDED RID: 48621 RVA: 0x002A6B20 File Offset: 0x002A4D20
|
||||
[Token(Token = "0x600BDED")]
|
||||
[Address(RVA = "0x2598C30", Offset = "0x2597C30", VA = "0x182598C30")]
|
||||
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: 0x0600BDEE RID: 48622 RVA: 0x002A6BFC File Offset: 0x002A4DFC
|
||||
[Token(Token = "0x600BDEE")]
|
||||
[Address(RVA = "0x2599EA0", Offset = "0x2598EA0", VA = "0x182599EA0")]
|
||||
private uint rotr32(uint x, int rot)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x17001DA6 RID: 7590
|
||||
// (get) Token: 0x0600BDEF RID: 48623 RVA: 0x002A6C0C File Offset: 0x002A4E0C
|
||||
[Token(Token = "0x17001DA6")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600BDEF")]
|
||||
[Address(RVA = "0x2599E70", Offset = "0x2598E70", VA = "0x182599E70", Slot = "15")]
|
||||
get
|
||||
{
|
||||
return "BLAKE2s";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600BDF0 RID: 48624 RVA: 0x002A6C20 File Offset: 0x002A4E20
|
||||
[Token(Token = "0x600BDF0")]
|
||||
[Address(RVA = "0x40F000", Offset = "0x40E000", VA = "0x18040F000", Slot = "16")]
|
||||
public virtual int GetDigestSize()
|
||||
{
|
||||
return this.digestLength;
|
||||
}
|
||||
|
||||
// Token: 0x0600BDF1 RID: 48625 RVA: 0x002A6C34 File Offset: 0x002A4E34
|
||||
[Token(Token = "0x600BDF1")]
|
||||
[Address(RVA = "0x8BCFC0", Offset = "0x8BBFC0", VA = "0x1808BCFC0", Slot = "17")]
|
||||
public virtual int GetByteLength()
|
||||
{
|
||||
return 64;
|
||||
}
|
||||
|
||||
// Token: 0x0600BDF2 RID: 48626 RVA: 0x002A6C44 File Offset: 0x002A4E44
|
||||
[Token(Token = "0x600BDF2")]
|
||||
[Address(RVA = "0x25964F0", Offset = "0x25954F0", VA = "0x1825964F0", 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: 0x0600BDF3 RID: 48627 RVA: 0x002A6C90 File Offset: 0x002A4E90
|
||||
[Token(Token = "0x600BDF3")]
|
||||
[Address(RVA = "0x2596540", Offset = "0x2595540", VA = "0x182596540", 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: 0x0600BDF4 RID: 48628 RVA: 0x002A6CBC File Offset: 0x002A4EBC
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x600BDF4")]
|
||||
[Address(RVA = "0x25997F0", Offset = "0x25987F0", VA = "0x1825997F0")]
|
||||
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: 0x04007809 RID: 30729
|
||||
[Token(Token = "0x4007809")]
|
||||
private static readonly uint[] blake2s_IV;
|
||||
|
||||
// Token: 0x0400780A RID: 30730
|
||||
[Token(Token = "0x400780A")]
|
||||
private static readonly byte[,] blake2s_sigma;
|
||||
|
||||
// Token: 0x0400780B RID: 30731
|
||||
[Token(Token = "0x400780B")]
|
||||
private const int ROUNDS = 10;
|
||||
|
||||
// Token: 0x0400780C RID: 30732
|
||||
[Token(Token = "0x400780C")]
|
||||
private const int BLOCK_LENGTH_BYTES = 64;
|
||||
|
||||
// Token: 0x0400780D RID: 30733
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400780D")]
|
||||
private int digestLength;
|
||||
|
||||
// Token: 0x0400780E RID: 30734
|
||||
[FieldOffset(Offset = "0x14")]
|
||||
[Token(Token = "0x400780E")]
|
||||
private int keyLength;
|
||||
|
||||
// Token: 0x0400780F RID: 30735
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400780F")]
|
||||
private byte[] salt;
|
||||
|
||||
// Token: 0x04007810 RID: 30736
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007810")]
|
||||
private byte[] personalization;
|
||||
|
||||
// Token: 0x04007811 RID: 30737
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007811")]
|
||||
private byte[] key;
|
||||
|
||||
// Token: 0x04007812 RID: 30738
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007812")]
|
||||
private byte[] buffer;
|
||||
|
||||
// Token: 0x04007813 RID: 30739
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007813")]
|
||||
private int bufferPos;
|
||||
|
||||
// Token: 0x04007814 RID: 30740
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007814")]
|
||||
private uint[] internalState;
|
||||
|
||||
// Token: 0x04007815 RID: 30741
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4007815")]
|
||||
private uint[] chainValue;
|
||||
|
||||
// Token: 0x04007816 RID: 30742
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4007816")]
|
||||
private uint t0;
|
||||
|
||||
// Token: 0x04007817 RID: 30743
|
||||
[FieldOffset(Offset = "0x54")]
|
||||
[Token(Token = "0x4007817")]
|
||||
private uint t1;
|
||||
|
||||
// Token: 0x04007818 RID: 30744
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4007818")]
|
||||
private uint f0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user