oh dear
This commit is contained in:
@@ -0,0 +1,261 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C49 RID: 7241
|
||||
[Token(Token = "0x2001C49")]
|
||||
public class CMac : IMac
|
||||
{
|
||||
// Token: 0x0600B51E RID: 46366 RVA: 0x00278950 File Offset: 0x00276B50
|
||||
[Token(Token = "0x600B51E")]
|
||||
[Address(RVA = "0x1C1A7A0", Offset = "0x1C195A0", VA = "0x181C1A7A0")]
|
||||
public CMac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B51F RID: 46367 RVA: 0x00278964 File Offset: 0x00276B64
|
||||
[Token(Token = "0x600B51F")]
|
||||
[Address(RVA = "0x1C1A810", Offset = "0x1C19610", VA = "0x181C1A810")]
|
||||
public CMac(IBlockCipher cipher, int macSizeInBits)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B51F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.CMac::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_63:
|
||||
stloc:ArgumentException(var_6_6D, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Block size must be either 64 or 128 bits")))
|
||||
}
|
||||
|
||||
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: 0x17001C89 RID: 7305
|
||||
// (get) Token: 0x0600B520 RID: 46368 RVA: 0x002789E0 File Offset: 0x00276BE0
|
||||
[Token(Token = "0x17001C89")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B520")]
|
||||
[Address(RVA = "0x1C1AA70", Offset = "0x1C19870", VA = "0x181C1AA70", Slot = "5")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B521 RID: 46369 RVA: 0x002789FC File Offset: 0x00276BFC
|
||||
[Token(Token = "0x600B521")]
|
||||
[Address(RVA = "0x1C1A670", Offset = "0x1C19470", VA = "0x181C1A670")]
|
||||
private static int ShiftLeft(byte[] block, byte[] output)
|
||||
{
|
||||
int length = block.Length;
|
||||
byte b;
|
||||
b += b;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B522 RID: 46370 RVA: 0x00278A1C File Offset: 0x00276C1C
|
||||
[Token(Token = "0x600B522")]
|
||||
[Address(RVA = "0x1C1A340", Offset = "0x1C19140", VA = "0x181C1A340")]
|
||||
private static byte[] DoubleLu(byte[] input)
|
||||
{
|
||||
byte[] array = new byte[input.Length];
|
||||
int num = input.Length - 1;
|
||||
byte b;
|
||||
b += b;
|
||||
num = input.Length;
|
||||
uint num2;
|
||||
num2 -= (uint)b;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B523 RID: 46371 RVA: 0x00278A54 File Offset: 0x00276C54
|
||||
[Token(Token = "0x600B523")]
|
||||
[Address(RVA = "0x1C1A450", Offset = "0x1C19250", VA = "0x181C1A450", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B523)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.CMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_8F:
|
||||
stloc:ArgumentException(var_12_9E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CMac mode only permits key to be set."), ldstr:string("parameters")))
|
||||
}
|
||||
|
||||
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.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: 0x0600B524 RID: 46372 RVA: 0x00278B00 File Offset: 0x00276D00
|
||||
[Token(Token = "0x600B524")]
|
||||
[Address(RVA = "0x40FFE0", Offset = "0x40EDE0", VA = "0x18040FFE0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B525 RID: 46373 RVA: 0x00278B14 File Offset: 0x00276D14
|
||||
[Token(Token = "0x600B525")]
|
||||
[Address(RVA = "0x1C1A6F0", Offset = "0x1C194F0", VA = "0x181C1A6F0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
if (num == array.Length)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
}
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B526 RID: 46374 RVA: 0x00278B60 File Offset: 0x00276D60
|
||||
[Token(Token = "0x600B526")]
|
||||
[Address(RVA = "0x1C19F50", Offset = "0x1C18D50", VA = "0x181C19F50", Slot = "8")]
|
||||
public void BlockUpdate(byte[] inBytes, int inOff, int len)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.bufOff;
|
||||
int num2 = 0;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
this.bufOff = num2;
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
if (num2 < blockCipher2)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
byte[] array2 = this.buf;
|
||||
Array.Copy(inBytes, inOff, array2, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B527 RID: 46375 RVA: 0x00278BC8 File Offset: 0x00276DC8
|
||||
[Token(Token = "0x600B527")]
|
||||
[Address(RVA = "0x1C1A160", Offset = "0x1C18F60", VA = "0x181C1A160", Slot = "9")]
|
||||
public int DoFinal(byte[] outBytes, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
ISO7816d4Padding iso7816d4Padding = new ISO7816d4Padding();
|
||||
int num = this.bufOff;
|
||||
byte[] array = this.buf;
|
||||
int num2 = iso7816d4Padding.AddPadding(array, num);
|
||||
byte[] lu = this.Lu;
|
||||
byte[] array2 = this.mac;
|
||||
int num3 = 0;
|
||||
if (num3 < array2.Length)
|
||||
{
|
||||
byte[] array3 = this.buf;
|
||||
num3++;
|
||||
byte[] array4 = this.mac;
|
||||
}
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
int num4 = this.macSize;
|
||||
byte[] array5 = this.mac;
|
||||
int num5 = 0;
|
||||
Array.Copy(array5, num5, outBytes, outOff, num4);
|
||||
byte[] array6 = this.buf;
|
||||
int length = array6.Length;
|
||||
int num6 = 0;
|
||||
Array.Clear(array6, num6, length);
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
this.bufOff = num3;
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B528 RID: 46376 RVA: 0x00278C94 File Offset: 0x00276E94
|
||||
[Token(Token = "0x600B528")]
|
||||
[Address(RVA = "0x1C1A600", Offset = "0x1C19400", VA = "0x181C1A600", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040072E5 RID: 29413
|
||||
[Token(Token = "0x40072E5")]
|
||||
private const byte CONSTANT_128 = 135;
|
||||
|
||||
// Token: 0x040072E6 RID: 29414
|
||||
[Token(Token = "0x40072E6")]
|
||||
private const byte CONSTANT_64 = 27;
|
||||
|
||||
// Token: 0x040072E7 RID: 29415
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072E7")]
|
||||
private byte[] ZEROES;
|
||||
|
||||
// Token: 0x040072E8 RID: 29416
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072E8")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040072E9 RID: 29417
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072E9")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040072EA RID: 29418
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40072EA")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040072EB RID: 29419
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40072EB")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040072EC RID: 29420
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40072EC")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x040072ED RID: 29421
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40072ED")]
|
||||
private byte[] L;
|
||||
|
||||
// Token: 0x040072EE RID: 29422
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40072EE")]
|
||||
private byte[] Lu;
|
||||
|
||||
// Token: 0x040072EF RID: 29423
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40072EF")]
|
||||
private byte[] Lu2;
|
||||
}
|
||||
}
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C4A RID: 7242
|
||||
[Token(Token = "0x2001C4A")]
|
||||
public class CbcBlockCipherMac : IMac
|
||||
{
|
||||
// Token: 0x0600B529 RID: 46377 RVA: 0x00278CD0 File Offset: 0x00276ED0
|
||||
[Token(Token = "0x600B529")]
|
||||
[Address(RVA = "0x1C1B230", Offset = "0x1C1A030", VA = "0x181C1B230")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B52A RID: 46378 RVA: 0x00278CE4 File Offset: 0x00276EE4
|
||||
[Token(Token = "0x600B52A")]
|
||||
[Address(RVA = "0x1C1B180", Offset = "0x1C19F80", VA = "0x181C1B180")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher, IBlockCipherPadding padding)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B52B RID: 46379 RVA: 0x00278CF8 File Offset: 0x00276EF8
|
||||
[Token(Token = "0x600B52B")]
|
||||
[Address(RVA = "0x1C1B210", Offset = "0x1C1A010", VA = "0x181C1B210")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher, int macSizeInBits)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B52C RID: 46380 RVA: 0x00278D08 File Offset: 0x00276F08
|
||||
[Token(Token = "0x600B52C")]
|
||||
[Address(RVA = "0x1C1B070", Offset = "0x1C19E70", VA = "0x181C1B070")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher, int macSizeInBits, IBlockCipherPadding padding)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B52C)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.CbcBlockCipherMac::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings.IBlockCipherPadding)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_40:
|
||||
stloc:ArgumentException(var_3_4A, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("MAC size must be multiple of 8")))
|
||||
}
|
||||
|
||||
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: 0x17001C8A RID: 7306
|
||||
// (get) Token: 0x0600B52D RID: 46381 RVA: 0x00278D60 File Offset: 0x00276F60
|
||||
[Token(Token = "0x17001C8A")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B52D")]
|
||||
[Address(RVA = "0x1C1B2B0", Offset = "0x1C1A0B0", VA = "0x181C1B2B0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B52E RID: 46382 RVA: 0x00278D7C File Offset: 0x00276F7C
|
||||
[Token(Token = "0x600B52E")]
|
||||
[Address(RVA = "0x1C1AE90", Offset = "0x1C19C90", VA = "0x181C1AE90", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B52F RID: 46383 RVA: 0x00278DC0 File Offset: 0x00276FC0
|
||||
[Token(Token = "0x600B52F")]
|
||||
[Address(RVA = "0x4730E0", Offset = "0x471EE0", VA = "0x1804730E0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B530 RID: 46384 RVA: 0x00278DD4 File Offset: 0x00276FD4
|
||||
[Token(Token = "0x600B530")]
|
||||
[Address(RVA = "0x1C1AFC0", Offset = "0x1C19DC0", VA = "0x181C1AFC0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
if (num == array.Length)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
}
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B531 RID: 46385 RVA: 0x00278E18 File Offset: 0x00277018
|
||||
[Token(Token = "0x600B531")]
|
||||
[Address(RVA = "0x1C1AAC0", Offset = "0x1C198C0", VA = "0x181C1AAC0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.bufOff;
|
||||
int num2 = 0;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.buf;
|
||||
this.bufOff = num2;
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
if (num2 < blockCipher2)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
byte[] array2 = this.buf;
|
||||
Array.Copy(input, inOff, array2, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B532 RID: 46386 RVA: 0x00278E80 File Offset: 0x00277080
|
||||
[Token(Token = "0x600B532")]
|
||||
[Address(RVA = "0x1C1ACC0", Offset = "0x1C19AC0", VA = "0x181C1ACC0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = 0;
|
||||
IBlockCipherPadding blockCipherPadding = this.padding;
|
||||
int i = this.bufOff;
|
||||
if (blockCipherPadding != 0)
|
||||
{
|
||||
if (i == blockCipher)
|
||||
{
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.buf;
|
||||
this.bufOff = num;
|
||||
}
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte[] array2 = this.buf;
|
||||
int num2 = this.macSize;
|
||||
byte[] array3 = this.buf;
|
||||
int num3 = 0;
|
||||
Array.Copy(array3, num3, output, outOff, num2);
|
||||
byte[] array4 = this.buf;
|
||||
int length = array4.Length;
|
||||
int num4 = 0;
|
||||
Array.Clear(array4, num4, length);
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
this.bufOff = num;
|
||||
return this.macSize;
|
||||
}
|
||||
while (i >= blockCipher)
|
||||
{
|
||||
}
|
||||
byte[] array5 = this.buf;
|
||||
int num5 = i + 1;
|
||||
this.bufOff = num5;
|
||||
int num6 = this.bufOff;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B533 RID: 46387 RVA: 0x00278F54 File Offset: 0x00277154
|
||||
[Token(Token = "0x600B533")]
|
||||
[Address(RVA = "0x1C1AF50", Offset = "0x1C19D50", VA = "0x181C1AF50", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040072F0 RID: 29424
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072F0")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040072F1 RID: 29425
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072F1")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040072F2 RID: 29426
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072F2")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040072F3 RID: 29427
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40072F3")]
|
||||
private IBlockCipherPadding padding;
|
||||
|
||||
// Token: 0x040072F4 RID: 29428
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40072F4")]
|
||||
private int macSize;
|
||||
}
|
||||
}
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C4C RID: 7244
|
||||
[Token(Token = "0x2001C4C")]
|
||||
public class CfbBlockCipherMac : IMac
|
||||
{
|
||||
// Token: 0x0600B53C RID: 46396 RVA: 0x00279184 File Offset: 0x00277384
|
||||
[Token(Token = "0x600B53C")]
|
||||
[Address(RVA = "0x1C1D880", Offset = "0x1C1C680", VA = "0x181C1D880")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B53D RID: 46397 RVA: 0x0027919C File Offset: 0x0027739C
|
||||
[Token(Token = "0x600B53D")]
|
||||
[Address(RVA = "0x1C1D900", Offset = "0x1C1C700", VA = "0x181C1D900")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher, IBlockCipherPadding padding)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B53E RID: 46398 RVA: 0x002791B0 File Offset: 0x002773B0
|
||||
[Token(Token = "0x600B53E")]
|
||||
[Address(RVA = "0x1C1D860", Offset = "0x1C1C660", VA = "0x181C1D860")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher, int cfbBitSize, int macSizeInBits)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B53F RID: 46399 RVA: 0x002791C0 File Offset: 0x002773C0
|
||||
[Token(Token = "0x600B53F")]
|
||||
[Address(RVA = "0x1C1D990", Offset = "0x1C1C790", VA = "0x181C1D990")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher, int cfbBitSize, int macSizeInBits, IBlockCipherPadding padding)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B53F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.CfbBlockCipherMac::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32,System.Int32,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings.IBlockCipherPadding)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_93:
|
||||
stloc:ArgumentException(var_8_9D, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("MAC size must be multiple of 8")))
|
||||
}
|
||||
|
||||
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: 0x17001C8D RID: 7309
|
||||
// (get) Token: 0x0600B540 RID: 46400 RVA: 0x0027926C File Offset: 0x0027746C
|
||||
[Token(Token = "0x17001C8D")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B540")]
|
||||
[Address(RVA = "0x1C1DB60", Offset = "0x1C1C960", VA = "0x181C1DB60", Slot = "5")]
|
||||
get
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
IBlockCipher blockCipher = macCFBBlockCipher.cipher;
|
||||
int blockSize = macCFBBlockCipher.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B541 RID: 46401 RVA: 0x00279298 File Offset: 0x00277498
|
||||
[Token(Token = "0x600B541")]
|
||||
[Address(RVA = "0x1C1D700", Offset = "0x1C1C500", VA = "0x181C1D700", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
this.Reset();
|
||||
this.cipher.Init(true, parameters);
|
||||
}
|
||||
|
||||
// Token: 0x0600B542 RID: 46402 RVA: 0x002792C0 File Offset: 0x002774C0
|
||||
[Token(Token = "0x600B542")]
|
||||
[Address(RVA = "0x40FFE0", Offset = "0x40EDE0", VA = "0x18040FFE0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B543 RID: 46403 RVA: 0x002792D4 File Offset: 0x002774D4
|
||||
[Token(Token = "0x600B543")]
|
||||
[Address(RVA = "0x1C1D7D0", Offset = "0x1C1C5D0", VA = "0x181C1D7D0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] buffer = this.Buffer;
|
||||
int num = this.bufOff;
|
||||
if (num == buffer.Length)
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
int num4 = macCFBBlockCipher.ProcessBlock(buffer, num3, array, num2);
|
||||
}
|
||||
int num5 = num + 1;
|
||||
this.bufOff = num5;
|
||||
}
|
||||
|
||||
// Token: 0x0600B544 RID: 46404 RVA: 0x00279330 File Offset: 0x00277530
|
||||
[Token(Token = "0x600B544")]
|
||||
[Address(RVA = "0x1C1D390", Offset = "0x1C1C190", VA = "0x181C1D390", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
int num = this.cipher.blockSize;
|
||||
int num2 = 0;
|
||||
int num3 = this.bufOff;
|
||||
num -= num3;
|
||||
if (len > num)
|
||||
{
|
||||
byte[] buffer = this.Buffer;
|
||||
Array.Copy(input, inOff, buffer, num3, num);
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
int num4 = 0;
|
||||
byte[] buffer2 = this.Buffer;
|
||||
int num5 = macCFBBlockCipher.ProcessBlock(buffer2, num4, array, num2);
|
||||
this.bufOff = num2;
|
||||
if (len > num)
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher2 = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
int num6 = macCFBBlockCipher2.ProcessBlock(input, inOff, array2, num2);
|
||||
}
|
||||
}
|
||||
byte[] buffer3 = this.Buffer;
|
||||
Array.Copy(input, inOff, buffer3, num3, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B545 RID: 46405 RVA: 0x002793E0 File Offset: 0x002775E0
|
||||
[Token(Token = "0x600B545")]
|
||||
[Address(RVA = "0x1C1D500", Offset = "0x1C1C300", VA = "0x181C1D500", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
IBlockCipherPadding blockCipherPadding = this.padding;
|
||||
int blockSize = macCFBBlockCipher.blockSize;
|
||||
int i = this.bufOff;
|
||||
if (blockCipherPadding != 0)
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher2 = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
int num = 0;
|
||||
byte[] buffer = this.Buffer;
|
||||
int num2 = 0;
|
||||
int num3 = macCFBBlockCipher2.ProcessBlock(buffer, num2, array, num);
|
||||
MacCFBBlockCipher macCFBBlockCipher3 = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
IBlockCipher blockCipher = macCFBBlockCipher3.cipher;
|
||||
int num4 = this.macSize;
|
||||
byte[] array3 = this.mac;
|
||||
int num5 = 0;
|
||||
Array.Copy(array3, num5, output, outOff, num4);
|
||||
byte[] buffer2 = this.Buffer;
|
||||
int length = buffer2.Length;
|
||||
int num6 = 0;
|
||||
Array.Clear(buffer2, num6, length);
|
||||
MacCFBBlockCipher macCFBBlockCipher4 = this.cipher;
|
||||
this.bufOff = num;
|
||||
byte[] iv = macCFBBlockCipher4.IV;
|
||||
byte[] cfbV = macCFBBlockCipher4.cfbV;
|
||||
IBlockCipher blockCipher2 = macCFBBlockCipher4.cipher;
|
||||
return this.macSize;
|
||||
}
|
||||
while (i >= blockSize)
|
||||
{
|
||||
}
|
||||
byte[] buffer3 = this.Buffer;
|
||||
int num7 = i + 1;
|
||||
this.bufOff = num7;
|
||||
int num8 = this.bufOff;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B546 RID: 46406 RVA: 0x002794F8 File Offset: 0x002776F8
|
||||
[Token(Token = "0x600B546")]
|
||||
[Address(RVA = "0x1C1D740", Offset = "0x1C1C540", VA = "0x181C1D740", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] buffer = this.Buffer;
|
||||
int length = buffer.Length;
|
||||
int num = 0;
|
||||
Array.Clear(buffer, num, length);
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
byte[] iv = macCFBBlockCipher.IV;
|
||||
byte[] cfbV = macCFBBlockCipher.cfbV;
|
||||
IBlockCipher blockCipher = macCFBBlockCipher.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040072FA RID: 29434
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072FA")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040072FB RID: 29435
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072FB")]
|
||||
private byte[] Buffer;
|
||||
|
||||
// Token: 0x040072FC RID: 29436
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072FC")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040072FD RID: 29437
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40072FD")]
|
||||
private MacCFBBlockCipher cipher;
|
||||
|
||||
// Token: 0x040072FE RID: 29438
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40072FE")]
|
||||
private IBlockCipherPadding padding;
|
||||
|
||||
// Token: 0x040072FF RID: 29439
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40072FF")]
|
||||
private int macSize;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Rfc8032;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C4D RID: 7245
|
||||
[Token(Token = "0x2001C4D")]
|
||||
public class Dstu7564Mac : IMac
|
||||
{
|
||||
// Token: 0x17001C8E RID: 7310
|
||||
// (get) Token: 0x0600B547 RID: 46407 RVA: 0x00279550 File Offset: 0x00277750
|
||||
[Token(Token = "0x17001C8E")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B547")]
|
||||
[Address(RVA = "0x1C206C0", Offset = "0x1C1F4C0", VA = "0x181C206C0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "DSTU7564Mac";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B548 RID: 46408 RVA: 0x00279564 File Offset: 0x00277764
|
||||
[Token(Token = "0x600B548")]
|
||||
[Address(RVA = "0x1C20640", Offset = "0x1C1F440", VA = "0x181C20640")]
|
||||
public Dstu7564Mac(int macSizeBits)
|
||||
{
|
||||
Dstu7564Digest dstu7564Digest = new Dstu7564Digest(macSizeBits);
|
||||
this.engine = dstu7564Digest;
|
||||
this.macSize = macSizeBits;
|
||||
}
|
||||
|
||||
// Token: 0x0600B549 RID: 46409 RVA: 0x0027958C File Offset: 0x0027778C
|
||||
[Token(Token = "0x600B549")]
|
||||
[Address(RVA = "0x1C20090", Offset = "0x1C1EE90", VA = "0x181C20090", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B549)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7564Mac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_74:
|
||||
stloc:ArgumentException(var_11_7E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Bad parameter passed")))
|
||||
}
|
||||
|
||||
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: 0x0600B54A RID: 46410 RVA: 0x00279618 File Offset: 0x00277818
|
||||
[Token(Token = "0x600B54A")]
|
||||
[Address(RVA = "0x40B720", Offset = "0x40A520", VA = "0x18040B720", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B54B RID: 46411 RVA: 0x0027962C File Offset: 0x0027782C
|
||||
[Token(Token = "0x600B54B")]
|
||||
[Address(RVA = "0x1C1FD40", Offset = "0x1C1EB40", VA = "0x181C1FD40", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B54B)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7564Mac::BlockUpdate(System.Byte[],System.Int32,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_25:
|
||||
stloc:InvalidOperationException(var_1_3A, newobj:InvalidOperationException(InvalidOperationException::.ctor, call:string(string::Concat, callgetter:string(Dstu7564Mac::get_AlgorithmName, ldloc:Dstu7564Mac(this)), ldstr:string(" not initialised"))))
|
||||
}
|
||||
|
||||
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: 0x0600B54C RID: 46412 RVA: 0x00279674 File Offset: 0x00277874
|
||||
[Token(Token = "0x600B54C")]
|
||||
[Address(RVA = "0x1C20600", Offset = "0x1C1F400", VA = "0x181C20600", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
int byteLength = this.engine.GetByteLength();
|
||||
}
|
||||
|
||||
// Token: 0x0600B54D RID: 46413 RVA: 0x00279694 File Offset: 0x00277894
|
||||
[Token(Token = "0x600B54D")]
|
||||
[Address(RVA = "0x1C1FE40", Offset = "0x1C1EC40", VA = "0x181C1FE40", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B54D)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7564Mac::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_C4:
|
||||
stloc:InvalidOperationException(var_11_D9, newobj:InvalidOperationException(InvalidOperationException::.ctor, call:string(string::Concat, callgetter:string(Dstu7564Mac::get_AlgorithmName, ldloc:Dstu7564Mac(this)), ldstr:string(" not initialised"))))
|
||||
}
|
||||
|
||||
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: 0x0600B54E RID: 46414 RVA: 0x0027977C File Offset: 0x0027797C
|
||||
[Token(Token = "0x600B54E")]
|
||||
[Address(RVA = "0x1C20590", Offset = "0x1C1F390", VA = "0x181C20590", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
this.inputLength = (ulong)0L;
|
||||
Dstu7564Digest dstu7564Digest = this.engine;
|
||||
byte[] array = this.paddedKey;
|
||||
if (array != 0)
|
||||
{
|
||||
this.engine.Update(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B54F RID: 46415 RVA: 0x002797B8 File Offset: 0x002779B8
|
||||
[Token(Token = "0x600B54F")]
|
||||
[Address(RVA = "0x1C20460", Offset = "0x1C1F260", VA = "0x181C20460")]
|
||||
private void Pad()
|
||||
{
|
||||
int num = this.engine.GetDigestSize();
|
||||
int digestSize = this.engine.GetDigestSize();
|
||||
int num2 = 0;
|
||||
num -= num2;
|
||||
if (num < 13)
|
||||
{
|
||||
int digestSize2 = this.engine.GetDigestSize();
|
||||
num += digestSize2;
|
||||
}
|
||||
byte[] array = new byte[num];
|
||||
array[0] = (byte)((ulong)128L);
|
||||
int length = array.Length;
|
||||
Pack.UInt64_To_LE(this.inputLength, array, length);
|
||||
this.engine.Update(array);
|
||||
}
|
||||
|
||||
// Token: 0x0600B550 RID: 46416 RVA: 0x0027983C File Offset: 0x00277A3C
|
||||
[Token(Token = "0x600B550")]
|
||||
[Address(RVA = "0x1C202B0", Offset = "0x1C1F0B0", VA = "0x181C202B0")]
|
||||
private byte[] PadKey(byte[] input)
|
||||
{
|
||||
int num = this.engine.GetDigestSize();
|
||||
int num2 = this.engine.GetDigestSize();
|
||||
int digestSize = this.engine.GetDigestSize();
|
||||
Dstu7564Digest dstu7564Digest = this.engine;
|
||||
int num3 = input.Length;
|
||||
num3 += num;
|
||||
num2 = num3;
|
||||
int num4 = num2 * digestSize;
|
||||
int digestSize2 = dstu7564Digest.GetDigestSize();
|
||||
Dstu7564Digest dstu7564Digest2 = this.engine;
|
||||
num = digestSize2;
|
||||
int digestSize3 = dstu7564Digest2.GetDigestSize();
|
||||
if (num < 13)
|
||||
{
|
||||
int digestSize4 = this.engine.GetDigestSize();
|
||||
num4 += digestSize4;
|
||||
}
|
||||
byte[] array = new byte[num4];
|
||||
int length = input.Length;
|
||||
int num5 = 0;
|
||||
int num6 = 0;
|
||||
Array.Copy(input, num6, array, num5, length);
|
||||
int length2 = input.Length;
|
||||
int length3 = array.Length;
|
||||
Ed25519.Encode32((uint)input.Length, array, length3);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x04007300 RID: 29440
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007300")]
|
||||
private Dstu7564Digest engine;
|
||||
|
||||
// Token: 0x04007301 RID: 29441
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007301")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x04007302 RID: 29442
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007302")]
|
||||
private ulong inputLength;
|
||||
|
||||
// Token: 0x04007303 RID: 29443
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007303")]
|
||||
private byte[] paddedKey;
|
||||
|
||||
// Token: 0x04007304 RID: 29444
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007304")]
|
||||
private byte[] invertedKey;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C4E RID: 7246
|
||||
[Token(Token = "0x2001C4E")]
|
||||
public class Dstu7624Mac : IMac
|
||||
{
|
||||
// Token: 0x0600B551 RID: 46417 RVA: 0x0027990C File Offset: 0x00277B0C
|
||||
[Token(Token = "0x600B551")]
|
||||
[Address(RVA = "0x1C20E10", Offset = "0x1C1FC10", VA = "0x181C20E10")]
|
||||
public Dstu7624Mac(int blockSizeBits, int q)
|
||||
{
|
||||
Dstu7624Engine dstu7624Engine = new Dstu7624Engine(blockSizeBits);
|
||||
this.engine = dstu7624Engine;
|
||||
this.blockSize = dstu7624Engine;
|
||||
this.macSize = blockSizeBits;
|
||||
byte[] array = new byte[dstu7624Engine];
|
||||
int num = this.blockSize;
|
||||
this.c = array;
|
||||
byte[] array2 = new byte[num];
|
||||
int num2 = this.blockSize;
|
||||
this.cTemp = array2;
|
||||
byte[] array3 = new byte[num2];
|
||||
int num3 = this.blockSize;
|
||||
this.kDelta = array3;
|
||||
byte[] array4 = new byte[num3];
|
||||
this.buf = array4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B552 RID: 46418 RVA: 0x00279990 File Offset: 0x00277B90
|
||||
[Token(Token = "0x600B552")]
|
||||
[Address(RVA = "0x1C20A10", Offset = "0x1C1F810", VA = "0x181C20A10", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B552)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7624Mac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_25:
|
||||
stloc:ArgumentException(var_6_36, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("invalid parameter passed to Dstu7624Mac init - "), ldloc:string(var_5))))
|
||||
}
|
||||
|
||||
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: 0x17001C8F RID: 7311
|
||||
// (get) Token: 0x0600B553 RID: 46419 RVA: 0x002799D4 File Offset: 0x00277BD4
|
||||
[Token(Token = "0x17001C8F")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B553")]
|
||||
[Address(RVA = "0x1C20EF0", Offset = "0x1C1FCF0", VA = "0x181C20EF0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "Dstu7624Mac";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B554 RID: 46420 RVA: 0x002799E8 File Offset: 0x00277BE8
|
||||
[Token(Token = "0x600B554")]
|
||||
[Address(RVA = "0x3FA560", Offset = "0x3F9360", VA = "0x1803FA560", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B555 RID: 46421 RVA: 0x002799FC File Offset: 0x00277BFC
|
||||
[Token(Token = "0x600B555")]
|
||||
[Address(RVA = "0x1C20C80", Offset = "0x1C1FA80", VA = "0x181C20C80", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
if (num == array.Length)
|
||||
{
|
||||
byte[] array2 = this.cTemp;
|
||||
int num2 = 0;
|
||||
byte[] array3 = this.c;
|
||||
int num3 = 0;
|
||||
this.Xor(array3, num3, array, num2, array2);
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
}
|
||||
int num4 = num + 1;
|
||||
this.bufOff = num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B556 RID: 46422 RVA: 0x00279A60 File Offset: 0x00277C60
|
||||
[Token(Token = "0x600B556")]
|
||||
[Address(RVA = "0x1C206F0", Offset = "0x1C1F4F0", VA = "0x181C206F0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
string text = this.engine.AlgorithmName;
|
||||
int num = this.bufOff;
|
||||
int num2 = 0;
|
||||
text -= num;
|
||||
if (len > text)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num3 = 0;
|
||||
this.processBlock(array, num3);
|
||||
this.bufOff = num2;
|
||||
if (len > text)
|
||||
{
|
||||
byte[] array2 = this.cTemp;
|
||||
byte[] array3 = this.c;
|
||||
int num4 = 0;
|
||||
this.Xor(array3, num4, input, inOff, array2);
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
}
|
||||
}
|
||||
byte[] array4 = this.buf;
|
||||
Array.Copy(input, inOff, array4, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B557 RID: 46423 RVA: 0x00279AF0 File Offset: 0x00277CF0
|
||||
[Token(Token = "0x600B557")]
|
||||
[Address(RVA = "0x1C20F20", Offset = "0x1C1FD20", VA = "0x181C20F20")]
|
||||
private void processBlock(byte[] input, int inOff)
|
||||
{
|
||||
byte[] array = this.cTemp;
|
||||
byte[] array2 = this.c;
|
||||
int num = 0;
|
||||
this.Xor(array2, num, input, inOff, array);
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
}
|
||||
|
||||
// Token: 0x0600B558 RID: 46424 RVA: 0x00279B28 File Offset: 0x00277D28
|
||||
[Token(Token = "0x600B558")]
|
||||
[Address(RVA = "0x1C20D40", Offset = "0x1C1FB40", VA = "0x181C20D40")]
|
||||
private void Xor(byte[] c, int cOff, byte[] input, int inOff, byte[] xorResult)
|
||||
{
|
||||
if (this.blockSize > 0)
|
||||
{
|
||||
byte b;
|
||||
input[0] = b;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B559 RID: 46425 RVA: 0x00279B4C File Offset: 0x00277D4C
|
||||
[Token(Token = "0x600B559")]
|
||||
[Address(RVA = "0x1C20890", Offset = "0x1C1F690", VA = "0x181C20890", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B559)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7624Mac::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_89:
|
||||
stloc:DataLengthException(var_13_93, newobj:DataLengthException(DataLengthException::.ctor, ldstr:string("Input must be a multiple of blocksize")))
|
||||
}
|
||||
|
||||
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: 0x0600B55A RID: 46426 RVA: 0x00279BF0 File Offset: 0x00277DF0
|
||||
[Token(Token = "0x600B55A")]
|
||||
[Address(RVA = "0x1C20BA0", Offset = "0x1C1F9A0", VA = "0x181C20BA0", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.c;
|
||||
int num = 0;
|
||||
Arrays.Fill(array, (byte)num);
|
||||
byte[] array2 = this.cTemp;
|
||||
int num2 = 0;
|
||||
Arrays.Fill(array2, (byte)num2);
|
||||
byte[] array3 = this.kDelta;
|
||||
int num3 = 0;
|
||||
Arrays.Fill(array3, (byte)num3);
|
||||
byte[] array4 = this.buf;
|
||||
int num4 = 0;
|
||||
Arrays.Fill(array4, (byte)num4);
|
||||
bool isPartialBlockOkay = this.engine.IsPartialBlockOkay;
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
int num5 = 0;
|
||||
this.bufOff = num5;
|
||||
}
|
||||
|
||||
// Token: 0x04007305 RID: 29445
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007305")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x04007306 RID: 29446
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007306")]
|
||||
private Dstu7624Engine engine;
|
||||
|
||||
// Token: 0x04007307 RID: 29447
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007307")]
|
||||
private int blockSize;
|
||||
|
||||
// Token: 0x04007308 RID: 29448
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007308")]
|
||||
private byte[] c;
|
||||
|
||||
// Token: 0x04007309 RID: 29449
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007309")]
|
||||
private byte[] cTemp;
|
||||
|
||||
// Token: 0x0400730A RID: 29450
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400730A")]
|
||||
private byte[] kDelta;
|
||||
|
||||
// Token: 0x0400730B RID: 29451
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400730B")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x0400730C RID: 29452
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400730C")]
|
||||
private int bufOff;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C4F RID: 7247
|
||||
[Token(Token = "0x2001C4F")]
|
||||
public class GMac : IMac
|
||||
{
|
||||
// Token: 0x0600B55B RID: 46427 RVA: 0x00279C6C File Offset: 0x00277E6C
|
||||
[Token(Token = "0x600B55B")]
|
||||
[Address(RVA = "0x1C224B0", Offset = "0x1C212B0", VA = "0x181C224B0")]
|
||||
public GMac(GcmBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
this.macSizeBits = (int)((ulong)128L);
|
||||
}
|
||||
|
||||
// Token: 0x0600B55C RID: 46428 RVA: 0x00279C94 File Offset: 0x00277E94
|
||||
[Token(Token = "0x600B55C")]
|
||||
[Address(RVA = "0x4F34F0", Offset = "0x4F22F0", VA = "0x1804F34F0")]
|
||||
public GMac(GcmBlockCipher cipher, int macSizeBits)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
this.macSizeBits = macSizeBits;
|
||||
}
|
||||
|
||||
// Token: 0x0600B55D RID: 46429 RVA: 0x00279CB8 File Offset: 0x00277EB8
|
||||
[Token(Token = "0x600B55D")]
|
||||
[Address(RVA = "0x1C22220", Offset = "0x1C21020", VA = "0x181C22220", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B55D)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.GMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_21:
|
||||
stloc:ArgumentException(var_6_2B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("GMAC requires ParametersWithIV")))
|
||||
}
|
||||
|
||||
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: 0x17001C90 RID: 7312
|
||||
// (get) Token: 0x0600B55E RID: 46430 RVA: 0x00279CF4 File Offset: 0x00277EF4
|
||||
[Token(Token = "0x17001C90")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B55E")]
|
||||
[Address(RVA = "0x1C224E0", Offset = "0x1C212E0", VA = "0x181C224E0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher.cipher;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B55F RID: 46431 RVA: 0x00279D14 File Offset: 0x00277F14
|
||||
[Token(Token = "0x600B55F")]
|
||||
[Address(RVA = "0x1C22210", Offset = "0x1C21010", VA = "0x181C22210", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSizeBits;
|
||||
}
|
||||
|
||||
// Token: 0x0600B560 RID: 46432 RVA: 0x00279D28 File Offset: 0x00277F28
|
||||
[Token(Token = "0x600B560")]
|
||||
[Address(RVA = "0x1C22410", Offset = "0x1C21210", VA = "0x181C22410", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
GcmBlockCipher gcmBlockCipher = this.cipher;
|
||||
gcmBlockCipher.CheckStatus();
|
||||
byte[] atBlock = gcmBlockCipher.atBlock;
|
||||
int atBlockPos = gcmBlockCipher.atBlockPos;
|
||||
int num = gcmBlockCipher.atBlockPos;
|
||||
num++;
|
||||
gcmBlockCipher.atBlockPos = num;
|
||||
if (num == 16)
|
||||
{
|
||||
byte[] atBlock2 = gcmBlockCipher.atBlock;
|
||||
byte[] s_at = gcmBlockCipher.S_at;
|
||||
gcmBlockCipher.gHASHBlock(s_at, atBlock2);
|
||||
gcmBlockCipher.atBlockPos = (int)((ulong)0L);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B561 RID: 46433 RVA: 0x00279D90 File Offset: 0x00277F90
|
||||
[Token(Token = "0x600B561")]
|
||||
[Address(RVA = "0x1C22110", Offset = "0x1C20F10", VA = "0x181C22110", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
this.cipher.ProcessAadBytes(input, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B562 RID: 46434 RVA: 0x00279DB4 File Offset: 0x00277FB4
|
||||
[Token(Token = "0x600B562")]
|
||||
[Address(RVA = "0x1C22140", Offset = "0x1C20F40", VA = "0x181C22140", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
return this.cipher.DoFinal(output, outOff);
|
||||
}
|
||||
|
||||
// Token: 0x0600B563 RID: 46435 RVA: 0x00279DDC File Offset: 0x00277FDC
|
||||
[Token(Token = "0x600B563")]
|
||||
[Address(RVA = "0x1C223E0", Offset = "0x1C211E0", VA = "0x181C223E0", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
this.cipher.Reset(true);
|
||||
}
|
||||
|
||||
// Token: 0x0400730D RID: 29453
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400730D")]
|
||||
private readonly GcmBlockCipher cipher;
|
||||
|
||||
// Token: 0x0400730E RID: 29454
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400730E")]
|
||||
private readonly int macSizeBits;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,422 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C50 RID: 7248
|
||||
[Token(Token = "0x2001C50")]
|
||||
public class Gost28147Mac : IMac
|
||||
{
|
||||
// Token: 0x0600B564 RID: 46436 RVA: 0x00279DFC File Offset: 0x00277FFC
|
||||
[Token(Token = "0x600B564")]
|
||||
[Address(RVA = "0x1C27810", Offset = "0x1C26610", VA = "0x181C27810")]
|
||||
public Gost28147Mac()
|
||||
{
|
||||
byte[] array = new byte[128];
|
||||
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.2BA9E4B370D477F8C7FE286262D7ADC69CAF290E).FieldHandle);
|
||||
this.S = array;
|
||||
base..ctor();
|
||||
byte[] array2 = new byte[8];
|
||||
this.mac = array2;
|
||||
byte[] array3 = new byte[8];
|
||||
this.buf = array3;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
}
|
||||
|
||||
// Token: 0x0600B565 RID: 46437 RVA: 0x00279E58 File Offset: 0x00278058
|
||||
[Token(Token = "0x600B565")]
|
||||
[Address(RVA = "0x1C271C0", Offset = "0x1C25FC0", VA = "0x181C271C0")]
|
||||
private static int[] GenerateWorkingKey(byte[] userKey)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B565)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Gost28147Mac::GenerateWorkingKey(System.Byte[])
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_33:
|
||||
stloc:ArgumentException(var_3_3D, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Key length invalid. Key needs to be 32 byte - 256 bit!!!")))
|
||||
}
|
||||
|
||||
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: 0x0600B566 RID: 46438 RVA: 0x00279EA4 File Offset: 0x002780A4
|
||||
[Token(Token = "0x600B566")]
|
||||
[Address(RVA = "0x1C272A0", Offset = "0x1C260A0", VA = "0x181C272A0", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
int num2 = 0;
|
||||
this.bufOff = num2;
|
||||
byte[] array2 = new byte[0];
|
||||
this.buf = array2;
|
||||
this.macIV = num2;
|
||||
if (parameters != 0)
|
||||
{
|
||||
if ("{il2cpp array field local7->}" == typeof(ParametersWithSBox).TypeHandle)
|
||||
{
|
||||
}
|
||||
int num3;
|
||||
if (parameters == 0)
|
||||
{
|
||||
if (parameters == 0)
|
||||
{
|
||||
if (parameters != 0 && parameters != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parameters == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
num3 = 0;
|
||||
if (parameters == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (parameters != 0)
|
||||
{
|
||||
while (num3 == 0)
|
||||
{
|
||||
}
|
||||
if (num3 != 0 && num3 != 0)
|
||||
{
|
||||
goto Block_8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
byte[] array4;
|
||||
int[] array3 = Gost28147Mac.GenerateWorkingKey(array4);
|
||||
this.workingKey = array3;
|
||||
byte[] array5 = this.mac;
|
||||
int length2 = array5.Length;
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
byte[] array6;
|
||||
Array.Copy(array6, num5, array5, num4, length2);
|
||||
byte[] array7;
|
||||
this.macIV = array7;
|
||||
return;
|
||||
Block_8:
|
||||
byte[] array9;
|
||||
int[] array8 = Gost28147Mac.GenerateWorkingKey(array9);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x17001C91 RID: 7313
|
||||
// (get) Token: 0x0600B567 RID: 46439 RVA: 0x00279FA8 File Offset: 0x002781A8
|
||||
[Token(Token = "0x17001C91")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B567")]
|
||||
[Address(RVA = "0x1C27970", Offset = "0x1C26770", VA = "0x181C27970", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "Gost28147Mac";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B568 RID: 46440 RVA: 0x00279FBC File Offset: 0x002781BC
|
||||
[Token(Token = "0x600B568")]
|
||||
[Address(RVA = "0x4101C0", Offset = "0x40EFC0", VA = "0x1804101C0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B569 RID: 46441 RVA: 0x00279FCC File Offset: 0x002781CC
|
||||
[Token(Token = "0x600B569")]
|
||||
[Address(RVA = "0x1C27BB0", Offset = "0x1C269B0", VA = "0x181C27BB0")]
|
||||
private int gost28147_mainStep(int n1, int key)
|
||||
{
|
||||
int length = this.S.Length;
|
||||
byte b;
|
||||
byte b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
b2 = b;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B56A RID: 46442 RVA: 0x0027A008 File Offset: 0x00278208
|
||||
[Token(Token = "0x600B56A")]
|
||||
[Address(RVA = "0x1C279A0", Offset = "0x1C267A0", VA = "0x181C279A0")]
|
||||
private void gost28147MacFunc(int[] workingKey, byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int num3 = workingKey[num2];
|
||||
int num4 = this.gost28147_mainStep(inOff, num3);
|
||||
num2++;
|
||||
num++;
|
||||
}
|
||||
|
||||
// Token: 0x0600B56B RID: 46443 RVA: 0x0027A038 File Offset: 0x00278238
|
||||
[Token(Token = "0x600B56B")]
|
||||
[Address(RVA = "0x1C278B0", Offset = "0x1C266B0", VA = "0x181C278B0")]
|
||||
private static int bytesToint(byte[] input, int inOff)
|
||||
{
|
||||
int length = input.Length;
|
||||
byte b = input[input];
|
||||
byte b2 = input[input];
|
||||
int num = inOff + 1;
|
||||
b += b2;
|
||||
b += b2;
|
||||
byte b3;
|
||||
b += b3;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B56C RID: 46444 RVA: 0x0027A074 File Offset: 0x00278274
|
||||
[Token(Token = "0x600B56C")]
|
||||
[Address(RVA = "0x1C27DF0", Offset = "0x1C26BF0", VA = "0x181C27DF0")]
|
||||
private static void intTobytes(int num, byte[] output, int outOff)
|
||||
{
|
||||
int num2 = outOff + 1;
|
||||
}
|
||||
|
||||
// Token: 0x0600B56D RID: 46445 RVA: 0x0027A08C File Offset: 0x0027828C
|
||||
[Token(Token = "0x600B56D")]
|
||||
[Address(RVA = "0x1C26F40", Offset = "0x1C25D40", VA = "0x181C26F40")]
|
||||
private static byte[] CM5func(byte[] buf, int bufOff, byte[] mac)
|
||||
{
|
||||
int num = buf.Length;
|
||||
num -= bufOff;
|
||||
byte[] array = new byte[num];
|
||||
int length = mac.Length;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(buf, bufOff, array, num3, length);
|
||||
int length2 = mac.Length;
|
||||
if (num2 != length2)
|
||||
{
|
||||
num2++;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B56E RID: 46446 RVA: 0x0027A0DC File Offset: 0x002782DC
|
||||
[Token(Token = "0x600B56E")]
|
||||
[Address(RVA = "0x1C276E0", Offset = "0x1C264E0", VA = "0x181C276E0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
int length = array.Length;
|
||||
if (num == length)
|
||||
{
|
||||
byte[] array2 = new byte[length];
|
||||
int length2 = this.mac.Length;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
byte[] array3 = this.buf;
|
||||
int num4 = 0;
|
||||
Array.Copy(array3, num4, array2, num3, length2);
|
||||
if ((this.firstStep ? 1 : 0) == num2)
|
||||
{
|
||||
}
|
||||
byte[] array4 = this.macIV;
|
||||
this.firstStep = num2 != 0;
|
||||
byte[] array6;
|
||||
if (array4 != 0)
|
||||
{
|
||||
byte[] array5 = this.buf;
|
||||
int num5 = 0;
|
||||
array6 = Gost28147Mac.CM5func(array5, num5, array4);
|
||||
}
|
||||
byte[] array7 = this.mac;
|
||||
int num6 = 0;
|
||||
int[] array8 = this.workingKey;
|
||||
this.gost28147MacFunc(array8, array6, num6, array7, num2);
|
||||
}
|
||||
int num7 = num + 1;
|
||||
this.bufOff = num7;
|
||||
}
|
||||
|
||||
// Token: 0x0600B56F RID: 46447 RVA: 0x0027A1A8 File Offset: 0x002783A8
|
||||
[Token(Token = "0x600B56F")]
|
||||
[Address(RVA = "0x1C26D50", Offset = "0x1C25B50", VA = "0x181C26D50", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
uint num2;
|
||||
num2 -= (uint)num;
|
||||
int num3 = 0;
|
||||
if (len > (int)num2)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
Array.Copy(input, inOff, array, num, (int)num2);
|
||||
byte[] array2 = new byte[this.buf.Length];
|
||||
int length = this.mac.Length;
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
Array.Copy(this.buf, num5, array2, num4, length);
|
||||
if ((this.firstStep ? 1 : 0) == num3)
|
||||
{
|
||||
}
|
||||
byte[] array3 = this.macIV;
|
||||
this.firstStep = num3 != 0;
|
||||
byte[] array5;
|
||||
if (array3 != 0)
|
||||
{
|
||||
byte[] array4 = this.buf;
|
||||
int num6 = 0;
|
||||
array5 = Gost28147Mac.CM5func(array4, num6, array3);
|
||||
}
|
||||
byte[] array6 = this.mac;
|
||||
int num7 = 0;
|
||||
int[] array7 = this.workingKey;
|
||||
this.gost28147MacFunc(array7, array5, num7, array6, num3);
|
||||
this.bufOff = num3;
|
||||
if (len > 8)
|
||||
{
|
||||
byte[] array8 = this.mac;
|
||||
byte[] array9 = Gost28147Mac.CM5func(input, inOff, array8);
|
||||
byte[] array10 = this.mac;
|
||||
int num8 = 0;
|
||||
int[] array11 = this.workingKey;
|
||||
this.gost28147MacFunc(array11, array9, num8, array10, num3);
|
||||
while (len != 8)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
byte[] array12 = this.buf;
|
||||
Array.Copy(input, inOff, array12, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B570 RID: 46448 RVA: 0x0027A2CC File Offset: 0x002784CC
|
||||
[Token(Token = "0x600B570")]
|
||||
[Address(RVA = "0x1C27030", Offset = "0x1C25E30", VA = "0x181C27030", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
if (num < 8)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
int num3 = this.bufOff;
|
||||
}
|
||||
byte[] array2 = new byte[this.buf.Length];
|
||||
int length = this.mac.Length;
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
byte[] array3 = this.buf;
|
||||
int num6 = 0;
|
||||
Array.Copy(array3, num6, array2, num5, length);
|
||||
byte[] array6;
|
||||
if ((this.firstStep ? 1 : 0) == num4)
|
||||
{
|
||||
byte[] array4 = this.mac;
|
||||
byte[] array5 = this.buf;
|
||||
int num7 = 0;
|
||||
array6 = Gost28147Mac.CM5func(array5, num7, array4);
|
||||
}
|
||||
this.firstStep = num4 != 0;
|
||||
byte[] array7 = this.mac;
|
||||
int num8 = 0;
|
||||
int[] array8 = this.workingKey;
|
||||
this.gost28147MacFunc(array8, array6, num8, array7, num4);
|
||||
byte[] array9 = this.mac;
|
||||
int num9 = array9.Length;
|
||||
num9 -= array8;
|
||||
ulong num10;
|
||||
Array.Copy(array9, array8, output, outOff, (int)num10);
|
||||
byte[] array10 = this.buf;
|
||||
int length2 = array10.Length;
|
||||
int num11 = 0;
|
||||
Array.Clear(array10, num11, length2);
|
||||
this.bufOff = num4;
|
||||
this.firstStep = true;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B571 RID: 46449 RVA: 0x0027A3EC File Offset: 0x002785EC
|
||||
[Token(Token = "0x600B571")]
|
||||
[Address(RVA = "0x1C276A0", Offset = "0x1C264A0", VA = "0x181C276A0", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
this.firstStep = true;
|
||||
}
|
||||
|
||||
// Token: 0x0400730F RID: 29455
|
||||
[Token(Token = "0x400730F")]
|
||||
private const int blockSize = 8;
|
||||
|
||||
// Token: 0x04007310 RID: 29456
|
||||
[Token(Token = "0x4007310")]
|
||||
private const int macSize = 4;
|
||||
|
||||
// Token: 0x04007311 RID: 29457
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007311")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x04007312 RID: 29458
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007312")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x04007313 RID: 29459
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007313")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x04007314 RID: 29460
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007314")]
|
||||
private bool firstStep = true;
|
||||
|
||||
// Token: 0x04007315 RID: 29461
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007315")]
|
||||
private int[] workingKey;
|
||||
|
||||
// Token: 0x04007316 RID: 29462
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007316")]
|
||||
private byte[] macIV;
|
||||
|
||||
// Token: 0x04007317 RID: 29463
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007317")]
|
||||
private byte[] S;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C51 RID: 7249
|
||||
[Token(Token = "0x2001C51")]
|
||||
public class HMac : IMac
|
||||
{
|
||||
// Token: 0x0600B572 RID: 46450 RVA: 0x0027A428 File Offset: 0x00278628
|
||||
[Token(Token = "0x600B572")]
|
||||
[Address(RVA = "0x1C286A0", Offset = "0x1C274A0", VA = "0x181C286A0")]
|
||||
public HMac(IDigest digest)
|
||||
{
|
||||
this.digest = digest;
|
||||
byte[] array = new byte[0];
|
||||
int num = this.digestSize;
|
||||
this.inputPad = array;
|
||||
byte[] array2 = new byte[num];
|
||||
this.outputBuf = array2;
|
||||
}
|
||||
|
||||
// Token: 0x17001C92 RID: 7314
|
||||
// (get) Token: 0x0600B573 RID: 46451 RVA: 0x0027A46C File Offset: 0x0027866C
|
||||
[Token(Token = "0x17001C92")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B573")]
|
||||
[Address(RVA = "0x1C28750", Offset = "0x1C27550", VA = "0x181C28750", Slot = "11")]
|
||||
get
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
return 0 + "/HMAC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B574 RID: 46452 RVA: 0x0027A494 File Offset: 0x00278694
|
||||
[Token(Token = "0x600B574")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "12")]
|
||||
public virtual IDigest GetUnderlyingDigest()
|
||||
{
|
||||
return this.digest;
|
||||
}
|
||||
|
||||
// Token: 0x0600B575 RID: 46453 RVA: 0x0027A4A8 File Offset: 0x002786A8
|
||||
[Token(Token = "0x600B575")]
|
||||
[Address(RVA = "0x1C28160", Offset = "0x1C26F60", VA = "0x181C28160", Slot = "13")]
|
||||
public virtual void Init(ICipherParameters parameters)
|
||||
{
|
||||
int length2;
|
||||
for (;;)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
int num = 0;
|
||||
if (parameters != 0 && parameters != 0)
|
||||
{
|
||||
byte[] array;
|
||||
int length = array.Length;
|
||||
byte[] array2 = this.inputPad;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(array, num3, array2, num2, length);
|
||||
IDigest digest2 = this.digest;
|
||||
IDigest digest3 = this.digest;
|
||||
int num4 = this.digestSize;
|
||||
int num5 = this.blockLength;
|
||||
byte[] array3 = this.inputPad;
|
||||
num5 -= num4;
|
||||
Array.Clear(array3, num4, num5);
|
||||
int num6 = this.blockLength;
|
||||
int num7 = 0;
|
||||
byte[] array4 = this.outputBuf;
|
||||
int num8 = 0;
|
||||
Array.Copy(this.inputPad, num8, array4, num7, num6);
|
||||
if (this.blockLength > 0)
|
||||
{
|
||||
byte[] array5 = this.inputPad;
|
||||
num++;
|
||||
if (this.blockLength > 0)
|
||||
{
|
||||
byte[] array6 = this.outputBuf;
|
||||
num++;
|
||||
}
|
||||
if (num != 0)
|
||||
{
|
||||
IDigest digest4 = this.digest;
|
||||
if (num == 0 || num == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
int num9 = this.blockLength;
|
||||
this.opadState = num;
|
||||
if (num == 0 || num == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
byte[] array7 = this.inputPad;
|
||||
IDigest digest5 = this.digest;
|
||||
length2 = array7.Length;
|
||||
if (length2 == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
IDigest digest6 = this.digest;
|
||||
if (length2 != 0 && length2 != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.ipadState = length2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B576 RID: 46454 RVA: 0x0027A5FC File Offset: 0x002787FC
|
||||
[Token(Token = "0x600B576")]
|
||||
[Address(RVA = "0x40B720", Offset = "0x40A520", VA = "0x18040B720", Slot = "14")]
|
||||
public virtual int GetMacSize()
|
||||
{
|
||||
return this.digestSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B577 RID: 46455 RVA: 0x0027A610 File Offset: 0x00278810
|
||||
[Token(Token = "0x600B577")]
|
||||
[Address(RVA = "0x1C285F0", Offset = "0x1C273F0", VA = "0x181C285F0", Slot = "15")]
|
||||
public virtual void Update(byte input)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B578 RID: 46456 RVA: 0x0027A62C File Offset: 0x0027882C
|
||||
[Token(Token = "0x600B578")]
|
||||
[Address(RVA = "0x1C27E90", Offset = "0x1C26C90", VA = "0x181C27E90", Slot = "16")]
|
||||
public virtual void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
}
|
||||
|
||||
// Token: 0x0600B579 RID: 46457 RVA: 0x0027A648 File Offset: 0x00278848
|
||||
[Token(Token = "0x600B579")]
|
||||
[Address(RVA = "0x1C27F10", Offset = "0x1C26D10", VA = "0x181C27F10", Slot = "17")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
int num;
|
||||
int num5;
|
||||
for (;;)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
num = this.blockLength;
|
||||
IMemoable memoable = this.opadState;
|
||||
IDigest digest2 = this.digest;
|
||||
if (memoable == 0)
|
||||
{
|
||||
int length = this.outputBuf.Length;
|
||||
}
|
||||
if (num != 0 && num != 0)
|
||||
{
|
||||
IDigest digest3 = this.digest;
|
||||
int num2 = this.blockLength;
|
||||
IDigest digest4 = this.digest;
|
||||
int num3 = this.digestSize;
|
||||
int num4 = this.blockLength;
|
||||
Array.Clear(this.outputBuf, num4, num3);
|
||||
IMemoable memoable2 = this.ipadState;
|
||||
IDigest digest5 = this.digest;
|
||||
if (memoable2 == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (num5 != 0 && num5 != 0)
|
||||
{
|
||||
goto Block_5;
|
||||
}
|
||||
}
|
||||
}
|
||||
num5 = this.inputPad.Length;
|
||||
num5 = num;
|
||||
return num5;
|
||||
Block_5:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B57A RID: 46458 RVA: 0x0027A700 File Offset: 0x00278900
|
||||
[Token(Token = "0x600B57A")]
|
||||
[Address(RVA = "0x1C28570", Offset = "0x1C27370", VA = "0x181C28570", Slot = "18")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
byte[] array = this.inputPad;
|
||||
IDigest digest2 = this.digest;
|
||||
int length = array.Length;
|
||||
}
|
||||
|
||||
// Token: 0x0600B57B RID: 46459 RVA: 0x0027A730 File Offset: 0x00278930
|
||||
[Token(Token = "0x600B57B")]
|
||||
[Address(RVA = "0x1C28650", Offset = "0x1C27450", VA = "0x181C28650")]
|
||||
private static void XorPad(byte[] pad, int len, byte n)
|
||||
{
|
||||
int num = 0;
|
||||
if (len > 0)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04007318 RID: 29464
|
||||
[Token(Token = "0x4007318")]
|
||||
private const byte IPAD = 54;
|
||||
|
||||
// Token: 0x04007319 RID: 29465
|
||||
[Token(Token = "0x4007319")]
|
||||
private const byte OPAD = 92;
|
||||
|
||||
// Token: 0x0400731A RID: 29466
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400731A")]
|
||||
private readonly IDigest digest;
|
||||
|
||||
// Token: 0x0400731B RID: 29467
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400731B")]
|
||||
private readonly int digestSize;
|
||||
|
||||
// Token: 0x0400731C RID: 29468
|
||||
[FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x400731C")]
|
||||
private readonly int blockLength;
|
||||
|
||||
// Token: 0x0400731D RID: 29469
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400731D")]
|
||||
private IMemoable ipadState;
|
||||
|
||||
// Token: 0x0400731E RID: 29470
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400731E")]
|
||||
private IMemoable opadState;
|
||||
|
||||
// Token: 0x0400731F RID: 29471
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400731F")]
|
||||
private readonly byte[] inputPad;
|
||||
|
||||
// Token: 0x04007320 RID: 29472
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007320")]
|
||||
private readonly byte[] outputBuf;
|
||||
}
|
||||
}
|
||||
+245
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C52 RID: 7250
|
||||
[Token(Token = "0x2001C52")]
|
||||
public class ISO9797Alg3Mac : IMac
|
||||
{
|
||||
// Token: 0x0600B57C RID: 46460 RVA: 0x0027A750 File Offset: 0x00278950
|
||||
[Token(Token = "0x600B57C")]
|
||||
[Address(RVA = "0x1C29450", Offset = "0x1C28250", VA = "0x181C29450")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B57D RID: 46461 RVA: 0x0027A764 File Offset: 0x00278964
|
||||
[Token(Token = "0x600B57D")]
|
||||
[Address(RVA = "0x1C294D0", Offset = "0x1C282D0", VA = "0x181C294D0")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, IBlockCipherPadding padding)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B57E RID: 46462 RVA: 0x0027A778 File Offset: 0x00278978
|
||||
[Token(Token = "0x600B57E")]
|
||||
[Address(RVA = "0x1C29280", Offset = "0x1C28080", VA = "0x181C29280")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, int macSizeInBits)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B57F RID: 46463 RVA: 0x0027A788 File Offset: 0x00278988
|
||||
[Token(Token = "0x600B57F")]
|
||||
[Address(RVA = "0x1C292A0", Offset = "0x1C280A0", VA = "0x181C292A0")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, int macSizeInBits, IBlockCipherPadding padding)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B57F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.ISO9797Alg3Mac::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings.IBlockCipherPadding)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_66:
|
||||
stloc:ArgumentException(var_6_70, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("cipher must be instance of DesEngine")))
|
||||
}
|
||||
|
||||
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: 0x17001C93 RID: 7315
|
||||
// (get) Token: 0x0600B580 RID: 46464 RVA: 0x0027A808 File Offset: 0x00278A08
|
||||
[Token(Token = "0x17001C93")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B580")]
|
||||
[Address(RVA = "0x1C29560", Offset = "0x1C28360", VA = "0x181C29560", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "ISO9797Alg3";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B581 RID: 46465 RVA: 0x0027A81C File Offset: 0x00278A1C
|
||||
[Token(Token = "0x600B581")]
|
||||
[Address(RVA = "0x1C28C60", Offset = "0x1C27A60", VA = "0x181C28C60", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B581)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.ISO9797Alg3Mac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_110:
|
||||
stloc:ArgumentException(var_27_11A, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Key must be either 112 or 168 bit long")))
|
||||
}
|
||||
|
||||
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: 0x0600B582 RID: 46466 RVA: 0x0027A944 File Offset: 0x00278B44
|
||||
[Token(Token = "0x600B582")]
|
||||
[Address(RVA = "0x40FFE0", Offset = "0x40EDE0", VA = "0x18040FFE0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B583 RID: 46467 RVA: 0x0027A958 File Offset: 0x00278B58
|
||||
[Token(Token = "0x600B583")]
|
||||
[Address(RVA = "0x1C291D0", Offset = "0x1C27FD0", VA = "0x181C291D0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
if (num == array.Length)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
}
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B584 RID: 46468 RVA: 0x0027A9A4 File Offset: 0x00278BA4
|
||||
[Token(Token = "0x600B584")]
|
||||
[Address(RVA = "0x1C287B0", Offset = "0x1C275B0", VA = "0x181C287B0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.bufOff;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
int num2 = 0;
|
||||
this.bufOff = num2;
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
if (num2 < blockCipher2)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
array += num2;
|
||||
byte[] array2 = this.buf;
|
||||
Array.Copy(input, inOff, array2, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B585 RID: 46469 RVA: 0x0027AA24 File Offset: 0x00278C24
|
||||
[Token(Token = "0x600B585")]
|
||||
[Address(RVA = "0x1C289D0", Offset = "0x1C277D0", VA = "0x181C289D0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = 0;
|
||||
IBlockCipherPadding blockCipherPadding = this.padding;
|
||||
int i = this.bufOff;
|
||||
if (blockCipherPadding != 0)
|
||||
{
|
||||
if (i == blockCipher)
|
||||
{
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
this.bufOff = num;
|
||||
}
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
DesEngine desEngine = new DesEngine();
|
||||
int[] workingKey = desEngine.GetWorkingKey();
|
||||
int blockSize = desEngine.GetBlockSize();
|
||||
int[] workingKey2 = desEngine.GetWorkingKey();
|
||||
int blockSize2 = desEngine.GetBlockSize();
|
||||
int num2 = this.macSize;
|
||||
byte[] array3 = this.mac;
|
||||
int num3 = 0;
|
||||
Array.Copy(array3, num3, output, outOff, num2);
|
||||
byte[] array4 = this.buf;
|
||||
int length = array4.Length;
|
||||
int num4 = 0;
|
||||
Array.Clear(array4, num4, length);
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
this.bufOff = num;
|
||||
return this.macSize;
|
||||
}
|
||||
while (i >= blockCipher)
|
||||
{
|
||||
}
|
||||
byte[] array5 = this.buf;
|
||||
int num5 = i + 1;
|
||||
this.bufOff = num5;
|
||||
int num6 = this.bufOff;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B586 RID: 46470 RVA: 0x0027AB24 File Offset: 0x00278D24
|
||||
[Token(Token = "0x600B586")]
|
||||
[Address(RVA = "0x1C29160", Offset = "0x1C27F60", VA = "0x181C29160", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04007321 RID: 29473
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007321")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x04007322 RID: 29474
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007322")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x04007323 RID: 29475
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007323")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x04007324 RID: 29476
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007324")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x04007325 RID: 29477
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007325")]
|
||||
private IBlockCipherPadding padding;
|
||||
|
||||
// Token: 0x04007326 RID: 29478
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007326")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x04007327 RID: 29479
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007327")]
|
||||
private KeyParameter lastKey2;
|
||||
|
||||
// Token: 0x04007328 RID: 29480
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4007328")]
|
||||
private KeyParameter lastKey3;
|
||||
}
|
||||
}
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C4B RID: 7243
|
||||
[Token(Token = "0x2001C4B")]
|
||||
internal class MacCFBBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B534 RID: 46388 RVA: 0x00278F90 File Offset: 0x00277190
|
||||
[Token(Token = "0x600B534")]
|
||||
[Address(RVA = "0x1C2BE40", Offset = "0x1C2AC40", VA = "0x181C2BE40")]
|
||||
public MacCFBBlockCipher(IBlockCipher cipher, int bitBlockSize)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
this.blockSize = bitBlockSize;
|
||||
byte[] array = new byte[bitBlockSize];
|
||||
this.IV = array;
|
||||
byte[] array2 = new byte[array];
|
||||
this.cfbV = array2;
|
||||
byte[] array3 = new byte[array2];
|
||||
this.cfbOutV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B535 RID: 46389 RVA: 0x00278FE4 File Offset: 0x002771E4
|
||||
[Token(Token = "0x600B535")]
|
||||
[Address(RVA = "0x1C2BA10", Offset = "0x1C2A810", VA = "0x181C2BA10", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
while (parameters != 0 && parameters != 0)
|
||||
{
|
||||
if (parameters != 0)
|
||||
{
|
||||
byte[] iv = this.IV;
|
||||
byte[] array;
|
||||
int length = array.Length;
|
||||
int num = iv.Length;
|
||||
num = length;
|
||||
num -= length;
|
||||
int num2 = 0;
|
||||
Array.Copy(array, num2, iv, num, num);
|
||||
break;
|
||||
}
|
||||
}
|
||||
byte[] iv2 = this.IV;
|
||||
byte[] array2 = this.cfbV;
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x17001C8B RID: 7307
|
||||
// (get) Token: 0x0600B536 RID: 46390 RVA: 0x0027905C File Offset: 0x0027725C
|
||||
[Token(Token = "0x17001C8B")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B536")]
|
||||
[Address(RVA = "0x1C2BF20", Offset = "0x1C2AD20", VA = "0x181C2BF20", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001C8C RID: 7308
|
||||
// (get) Token: 0x0600B537 RID: 46391 RVA: 0x00279080 File Offset: 0x00277280
|
||||
[Token(Token = "0x17001C8C")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B537")]
|
||||
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B538 RID: 46392 RVA: 0x00279090 File Offset: 0x00277290
|
||||
[Token(Token = "0x600B538")]
|
||||
[Address(RVA = "0x42EE50", Offset = "0x42DC50", VA = "0x18042EE50", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B539 RID: 46393 RVA: 0x002790A4 File Offset: 0x002772A4
|
||||
[Token(Token = "0x600B539")]
|
||||
[Address(RVA = "0x1C2BBB0", Offset = "0x1C2A9B0", VA = "0x181C2BBB0", Slot = "8")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array = this.cfbOutV;
|
||||
byte[] array2 = this.cfbV;
|
||||
int num = this.blockSize;
|
||||
if (num > 0)
|
||||
{
|
||||
byte[] array3 = this.cfbOutV;
|
||||
int num2 = this.blockSize;
|
||||
}
|
||||
byte[] array4 = this.cfbV;
|
||||
int num3 = array4.Length;
|
||||
int num4 = 0;
|
||||
num3 -= num;
|
||||
Array.Copy(array4, num, array4, num4, num3);
|
||||
byte[] array5 = this.cfbV;
|
||||
int num5 = this.blockSize;
|
||||
int num6 = array5.Length;
|
||||
num6 -= num5;
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B53A RID: 46394 RVA: 0x0027913C File Offset: 0x0027733C
|
||||
[Token(Token = "0x600B53A")]
|
||||
[Address(RVA = "0x1C2BDD0", Offset = "0x1C2ABD0", VA = "0x181C2BDD0", Slot = "9")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] iv = this.IV;
|
||||
byte[] array = this.cfbV;
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B53B RID: 46395 RVA: 0x00279168 File Offset: 0x00277368
|
||||
[Token(Token = "0x600B53B")]
|
||||
[Address(RVA = "0x1C2B9A0", Offset = "0x1C2A7A0", VA = "0x181C2B9A0")]
|
||||
public void GetMacBlock(byte[] mac)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x040072F5 RID: 29429
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40072F5")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x040072F6 RID: 29430
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40072F6")]
|
||||
private byte[] cfbV;
|
||||
|
||||
// Token: 0x040072F7 RID: 29431
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40072F7")]
|
||||
private byte[] cfbOutV;
|
||||
|
||||
// Token: 0x040072F8 RID: 29432
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40072F8")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x040072F9 RID: 29433
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40072F9")]
|
||||
private readonly IBlockCipher cipher;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,458 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C53 RID: 7251
|
||||
[Token(Token = "0x2001C53")]
|
||||
public class Poly1305 : IMac
|
||||
{
|
||||
// Token: 0x0600B587 RID: 46471 RVA: 0x0027AB60 File Offset: 0x00278D60
|
||||
[Token(Token = "0x600B587")]
|
||||
[Address(RVA = "0x1C2DD00", Offset = "0x1C2CB00", VA = "0x181C2DD00")]
|
||||
public Poly1305()
|
||||
{
|
||||
byte[] array = new byte[1];
|
||||
this.singleByte = array;
|
||||
byte[] array2 = new byte[16];
|
||||
this.currentBlock = array2;
|
||||
base..ctor();
|
||||
this.cipher = (ulong)0L;
|
||||
}
|
||||
|
||||
// Token: 0x0600B588 RID: 46472 RVA: 0x0027AB9C File Offset: 0x00278D9C
|
||||
[Token(Token = "0x600B588")]
|
||||
[Address(RVA = "0x1C2DD70", Offset = "0x1C2CB70", VA = "0x181C2DD70")]
|
||||
public Poly1305(IBlockCipher cipher)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B588)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Poly1305::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_38:
|
||||
stloc:ArgumentException(var_2_42, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Poly1305 requires a 128 bit block cipher.")))
|
||||
}
|
||||
|
||||
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: 0x0600B589 RID: 46473 RVA: 0x0027ABEC File Offset: 0x00278DEC
|
||||
[Token(Token = "0x600B589")]
|
||||
[Address(RVA = "0x1C2D400", Offset = "0x1C2C200", VA = "0x181C2D400", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B589)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Poly1305::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_4F:
|
||||
stloc:ArgumentException(var_8_5E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Poly1305 requires an IV when used with a block cipher."), ldstr:string("parameters")))
|
||||
}
|
||||
|
||||
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: 0x0600B58A RID: 46474 RVA: 0x0027AC58 File Offset: 0x00278E58
|
||||
[Token(Token = "0x600B58A")]
|
||||
[Address(RVA = "0x1C2D950", Offset = "0x1C2C750", VA = "0x181C2D950")]
|
||||
private void SetKey(byte[] key, byte[] nonce)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B58A)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Poly1305::SetKey(System.Byte[],System.Byte[])
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_B2:
|
||||
stloc:ArgumentException(var_6_BC, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Poly1305 key must be 256 bits.")))
|
||||
}
|
||||
|
||||
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: 0x17001C94 RID: 7316
|
||||
// (get) Token: 0x0600B58B RID: 46475 RVA: 0x0027AD24 File Offset: 0x00278F24
|
||||
[Token(Token = "0x17001C94")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B58B")]
|
||||
[Address(RVA = "0x1C2DE40", Offset = "0x1C2CC40", VA = "0x181C2DE40", Slot = "5")]
|
||||
get
|
||||
{
|
||||
if (this.cipher == 0)
|
||||
{
|
||||
return "Poly1305";
|
||||
}
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B58C RID: 46476 RVA: 0x0027AD44 File Offset: 0x00278F44
|
||||
[Token(Token = "0x600B58C")]
|
||||
[Address(RVA = "0x4B6B10", Offset = "0x4B5910", VA = "0x1804B6B10", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x0600B58D RID: 46477 RVA: 0x0027AD54 File Offset: 0x00278F54
|
||||
[Token(Token = "0x600B58D")]
|
||||
[Address(RVA = "0x1C2DBF0", Offset = "0x1C2C9F0", VA = "0x181C2DBF0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
this.singleByte[0] = input;
|
||||
byte[] array = this.singleByte;
|
||||
int num = this.currentBlockOffset;
|
||||
int num2 = 0;
|
||||
if (num == 16)
|
||||
{
|
||||
this.ProcessBlock();
|
||||
this.currentBlockOffset = num2;
|
||||
}
|
||||
uint num3;
|
||||
num3 -= (uint)num2;
|
||||
uint num4;
|
||||
num4 -= (uint)num2;
|
||||
int num5 = Math.Min((int)num4, (int)num3);
|
||||
int num6 = this.currentBlockOffset;
|
||||
byte[] array2 = this.currentBlock;
|
||||
Array.Copy(array, num2, array2, num6, num5);
|
||||
num2 += num5;
|
||||
}
|
||||
|
||||
// Token: 0x0600B58E RID: 46478 RVA: 0x0027ADCC File Offset: 0x00278FCC
|
||||
[Token(Token = "0x600B58E")]
|
||||
[Address(RVA = "0x1C2D090", Offset = "0x1C2BE90", VA = "0x181C2D090", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
int num = 0;
|
||||
if (len > 0)
|
||||
{
|
||||
if (this.currentBlockOffset == 16)
|
||||
{
|
||||
this.ProcessBlock();
|
||||
this.currentBlockOffset = num;
|
||||
}
|
||||
uint num2;
|
||||
num2 -= (uint)num;
|
||||
int num3 = Math.Min(len, (int)num2);
|
||||
int num4 = this.currentBlockOffset;
|
||||
byte[] array = this.currentBlock;
|
||||
Array.Copy(input, 0, array, num4, num3);
|
||||
num += num3;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B58F RID: 46479 RVA: 0x0027AE20 File Offset: 0x00279020
|
||||
[Token(Token = "0x600B58F")]
|
||||
[Address(RVA = "0x1C2D620", Offset = "0x1C2C420", VA = "0x181C2D620")]
|
||||
private void ProcessBlock()
|
||||
{
|
||||
if (this.currentBlockOffset < 16)
|
||||
{
|
||||
byte[] array = this.currentBlock;
|
||||
int num = this.currentBlockOffset;
|
||||
num++;
|
||||
if (num < 16)
|
||||
{
|
||||
byte[] array2 = this.currentBlock;
|
||||
num++;
|
||||
}
|
||||
}
|
||||
byte[] array3 = this.currentBlock;
|
||||
int num2 = 0;
|
||||
int @int = SerializationHeaderRecord.GetInt32(array3, num2);
|
||||
int int2 = SerializationHeaderRecord.GetInt32(this.currentBlock, 4);
|
||||
int num3 = SerializationHeaderRecord.GetInt32(this.currentBlock, 8);
|
||||
int int3 = SerializationHeaderRecord.GetInt32(this.currentBlock, 12);
|
||||
uint num4 = this.h4;
|
||||
num4 += (uint)int3;
|
||||
if (this.currentBlockOffset == 16)
|
||||
{
|
||||
num4 += (uint)16777216;
|
||||
}
|
||||
uint num5 = this.r0;
|
||||
uint num6 = this.s4;
|
||||
uint num7 = this.s2;
|
||||
uint num8 = this.s1;
|
||||
uint num9 = this.s3;
|
||||
uint num10 = this.r1;
|
||||
uint num11 = num4 * num7;
|
||||
uint num12 = num8 * num4;
|
||||
int num13 = int3 * (int)num7;
|
||||
num3 = int3;
|
||||
num7 = num4;
|
||||
num12 += (uint)num13;
|
||||
num13 = @int;
|
||||
int num14 = num13 * (int)num5;
|
||||
uint num15 = num7 * num9;
|
||||
num12 += (uint)num14;
|
||||
num14 = num3;
|
||||
int num16 = num14 * (int)num9;
|
||||
num12 += (uint)num16;
|
||||
num16 = int2;
|
||||
int num17 = num16 * (int)num6;
|
||||
num12 += (uint)num17;
|
||||
num17 = int3;
|
||||
int num18 = num17 * (int)num9;
|
||||
num11 += (uint)num18;
|
||||
num18 = @int;
|
||||
int num19 = num18 * (int)num10;
|
||||
num11 += (uint)num19;
|
||||
num19 = int2;
|
||||
int num20 = num19 * (int)num5;
|
||||
num11 += (uint)num20;
|
||||
num20 = num3;
|
||||
int num21 = num20 * (int)num6;
|
||||
num11 += (uint)num21;
|
||||
num11 += num12;
|
||||
int num22 = num3 * (int)num6;
|
||||
num15 += (uint)num22;
|
||||
num22 = @int;
|
||||
int num23 = num22 * int3;
|
||||
num15 += (uint)num23;
|
||||
num23 = int2;
|
||||
int num24 = num23 * (int)num10;
|
||||
num15 += (uint)num24;
|
||||
num24 = num3;
|
||||
int num25 = num24 * (int)num5;
|
||||
num15 += (uint)num25;
|
||||
num15 += num11;
|
||||
int num26 = num3 * (int)num5;
|
||||
num11 = num4;
|
||||
uint num27 = num11 * num6;
|
||||
num26 += (int)num27;
|
||||
int num28 = @int * (int)num9;
|
||||
num26 += num28;
|
||||
num28 = int2;
|
||||
int num29 = num28 * int3;
|
||||
num26 += num29;
|
||||
num29 = num3;
|
||||
int num30 = num29 * (int)num10;
|
||||
num26 += num30;
|
||||
num26 += (int)num15;
|
||||
uint num31 = num4 * num5;
|
||||
int num32 = num3 * (int)num10;
|
||||
int num33 = int2 * (int)num9;
|
||||
int num34 = num3 * int3;
|
||||
uint num35 = num15 * (uint)@int;
|
||||
num35 += (uint)num32;
|
||||
num35 += num31;
|
||||
num35 += (uint)num33;
|
||||
num35 += (uint)num34;
|
||||
num35 += (uint)num26;
|
||||
num35 += num12;
|
||||
num35 += num11;
|
||||
}
|
||||
|
||||
// Token: 0x0600B590 RID: 46480 RVA: 0x0027B09C File Offset: 0x0027929C
|
||||
[Token(Token = "0x600B590")]
|
||||
[Address(RVA = "0x1C2D180", Offset = "0x1C2BF80", VA = "0x181C2D180", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
uint num;
|
||||
Check.DataLength(output, outOff, (int)num, "Output buffer is too short.");
|
||||
if (this.currentBlockOffset > 0)
|
||||
{
|
||||
this.ProcessBlock();
|
||||
}
|
||||
uint num2 = this.h0;
|
||||
num2 += (uint)outOff;
|
||||
num2 += num2;
|
||||
num2 += num2;
|
||||
this.h0 = num2;
|
||||
this.h1 = output;
|
||||
this.h2 = output;
|
||||
num2 += num2;
|
||||
num2 += output;
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x0600B591 RID: 46481 RVA: 0x0027B0F8 File Offset: 0x002792F8
|
||||
[Token(Token = "0x600B591")]
|
||||
[Address(RVA = "0x1C2D940", Offset = "0x1C2C740", VA = "0x181C2D940", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
int num = 0;
|
||||
this.currentBlockOffset = num;
|
||||
this.h3 = (uint)num;
|
||||
this.h1 = (uint)num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B592 RID: 46482 RVA: 0x0027B11C File Offset: 0x0027931C
|
||||
[Token(Token = "0x600B592")]
|
||||
[Address(RVA = "0x1C2DEA0", Offset = "0x1C2CCA0", VA = "0x181C2DEA0")]
|
||||
private static ulong mul32x32_64(uint i1, uint i2)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B592)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.UInt64 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Poly1305::mul32x32_64(System.UInt32,System.UInt32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:uint32(var_0_03, mul:uint32(ldloc:uint32(i1), ldloc:uint32(i1)))
|
||||
}
|
||||
|
||||
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: 0x04007329 RID: 29481
|
||||
[Token(Token = "0x4007329")]
|
||||
private const int BlockSize = 16;
|
||||
|
||||
// Token: 0x0400732A RID: 29482
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400732A")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x0400732B RID: 29483
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400732B")]
|
||||
private readonly byte[] singleByte;
|
||||
|
||||
// Token: 0x0400732C RID: 29484
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400732C")]
|
||||
private uint r0;
|
||||
|
||||
// Token: 0x0400732D RID: 29485
|
||||
[FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x400732D")]
|
||||
private uint r1;
|
||||
|
||||
// Token: 0x0400732E RID: 29486
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400732E")]
|
||||
private uint r2;
|
||||
|
||||
// Token: 0x0400732F RID: 29487
|
||||
[FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x400732F")]
|
||||
private uint r3;
|
||||
|
||||
// Token: 0x04007330 RID: 29488
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007330")]
|
||||
private uint r4;
|
||||
|
||||
// Token: 0x04007331 RID: 29489
|
||||
[FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x4007331")]
|
||||
private uint s1;
|
||||
|
||||
// Token: 0x04007332 RID: 29490
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007332")]
|
||||
private uint s2;
|
||||
|
||||
// Token: 0x04007333 RID: 29491
|
||||
[FieldOffset(Offset = "0x3C")]
|
||||
[Token(Token = "0x4007333")]
|
||||
private uint s3;
|
||||
|
||||
// Token: 0x04007334 RID: 29492
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007334")]
|
||||
private uint s4;
|
||||
|
||||
// Token: 0x04007335 RID: 29493
|
||||
[FieldOffset(Offset = "0x44")]
|
||||
[Token(Token = "0x4007335")]
|
||||
private uint k0;
|
||||
|
||||
// Token: 0x04007336 RID: 29494
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4007336")]
|
||||
private uint k1;
|
||||
|
||||
// Token: 0x04007337 RID: 29495
|
||||
[FieldOffset(Offset = "0x4C")]
|
||||
[Token(Token = "0x4007337")]
|
||||
private uint k2;
|
||||
|
||||
// Token: 0x04007338 RID: 29496
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4007338")]
|
||||
private uint k3;
|
||||
|
||||
// Token: 0x04007339 RID: 29497
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4007339")]
|
||||
private byte[] currentBlock;
|
||||
|
||||
// Token: 0x0400733A RID: 29498
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x400733A")]
|
||||
private int currentBlockOffset;
|
||||
|
||||
// Token: 0x0400733B RID: 29499
|
||||
[FieldOffset(Offset = "0x64")]
|
||||
[Token(Token = "0x400733B")]
|
||||
private uint h0;
|
||||
|
||||
// Token: 0x0400733C RID: 29500
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x400733C")]
|
||||
private uint h1;
|
||||
|
||||
// Token: 0x0400733D RID: 29501
|
||||
[FieldOffset(Offset = "0x6C")]
|
||||
[Token(Token = "0x400733D")]
|
||||
private uint h2;
|
||||
|
||||
// Token: 0x0400733E RID: 29502
|
||||
[FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x400733E")]
|
||||
private uint h3;
|
||||
|
||||
// Token: 0x0400733F RID: 29503
|
||||
[FieldOffset(Offset = "0x74")]
|
||||
[Token(Token = "0x400733F")]
|
||||
private uint h4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,300 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C54 RID: 7252
|
||||
[Token(Token = "0x2001C54")]
|
||||
public class SipHash : IMac
|
||||
{
|
||||
// Token: 0x0600B593 RID: 46483 RVA: 0x0027B12C File Offset: 0x0027932C
|
||||
[Token(Token = "0x600B593")]
|
||||
[Address(RVA = "0x1C30570", Offset = "0x1C2F370", VA = "0x181C30570")]
|
||||
public SipHash()
|
||||
{
|
||||
this.c = (int)((ulong)2L);
|
||||
this.d = (int)((ulong)4L);
|
||||
}
|
||||
|
||||
// Token: 0x0600B594 RID: 46484 RVA: 0x0027B154 File Offset: 0x00279354
|
||||
[Token(Token = "0x600B594")]
|
||||
[Address(RVA = "0x8F0C90", Offset = "0x8EFA90", VA = "0x1808F0C90")]
|
||||
public SipHash(int c, int d)
|
||||
{
|
||||
this.c = c;
|
||||
this.d = d;
|
||||
}
|
||||
|
||||
// Token: 0x17001C95 RID: 7317
|
||||
// (get) Token: 0x0600B595 RID: 46485 RVA: 0x0027B178 File Offset: 0x00279378
|
||||
[Token(Token = "0x17001C95")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B595")]
|
||||
[Address(RVA = "0x1C305A0", Offset = "0x1C2F3A0", VA = "0x181C305A0", Slot = "11")]
|
||||
get
|
||||
{
|
||||
object[] array = new object[4];
|
||||
if ("SipHash-" != 0)
|
||||
{
|
||||
}
|
||||
array[0] = "SipHash-";
|
||||
int num = this.c;
|
||||
if (num != 0)
|
||||
{
|
||||
}
|
||||
array[1] = num;
|
||||
if ("-" != 0)
|
||||
{
|
||||
}
|
||||
array[2] = "-";
|
||||
int num2 = this.d;
|
||||
num = num2;
|
||||
if (num2 != 0)
|
||||
{
|
||||
}
|
||||
array[3] = num;
|
||||
return string.Concat(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B596 RID: 46486 RVA: 0x0027B1E8 File Offset: 0x002793E8
|
||||
[Token(Token = "0x600B596")]
|
||||
[Address(RVA = "0x4101D0", Offset = "0x40EFD0", VA = "0x1804101D0", Slot = "12")]
|
||||
public virtual int GetMacSize()
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
// Token: 0x0600B597 RID: 46487 RVA: 0x0027B1F8 File Offset: 0x002793F8
|
||||
[Token(Token = "0x600B597")]
|
||||
[Address(RVA = "0x1C30310", Offset = "0x1C2F110", VA = "0x181C30310", Slot = "13")]
|
||||
public virtual void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B597)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.SipHash::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_50:
|
||||
stloc:ArgumentException(var_7_5F, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("must be a 128-bit key"), ldstr:string("parameters")))
|
||||
}
|
||||
|
||||
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: 0x0600B598 RID: 46488 RVA: 0x0027B268 File Offset: 0x00279468
|
||||
[Token(Token = "0x600B598")]
|
||||
[Address(RVA = "0x1C30520", Offset = "0x1C2F320", VA = "0x181C30520", Slot = "14")]
|
||||
public virtual void Update(byte input)
|
||||
{
|
||||
int num = this.wordPos;
|
||||
num++;
|
||||
this.m = (long)input;
|
||||
this.wordPos = num;
|
||||
if (num == 8)
|
||||
{
|
||||
this.Reset();
|
||||
this.wordPos = (int)((ulong)0L);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B599 RID: 46489 RVA: 0x0027B2A4 File Offset: 0x002794A4
|
||||
[Token(Token = "0x600B599")]
|
||||
[Address(RVA = "0x1C30010", Offset = "0x1C2EE10", VA = "0x181C30010", Slot = "15")]
|
||||
public virtual void BlockUpdate(byte[] input, int offset, int length)
|
||||
{
|
||||
int num = this.wordPos;
|
||||
int num2 = 0;
|
||||
if (num != 0)
|
||||
{
|
||||
if (length > 0)
|
||||
{
|
||||
ulong num3 = Pack.LE_To_UInt64(input, 0);
|
||||
long num4 = this.m;
|
||||
this.m = num4;
|
||||
this.Reset();
|
||||
num2 += 8;
|
||||
this.m = (long)num3;
|
||||
}
|
||||
if (num2 >= length)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int num5 = this.wordPos;
|
||||
num5++;
|
||||
byte b;
|
||||
this.m = (long)b;
|
||||
this.wordPos = num5;
|
||||
if (num5 == 8)
|
||||
{
|
||||
this.Reset();
|
||||
this.wordPos = num2;
|
||||
}
|
||||
}
|
||||
if (length > 0)
|
||||
{
|
||||
ulong num6 = Pack.LE_To_UInt64(input, 0);
|
||||
this.m = (long)num6;
|
||||
this.Reset();
|
||||
num2 += 8;
|
||||
}
|
||||
if (num2 < length)
|
||||
{
|
||||
byte b2;
|
||||
this.m = (long)b2;
|
||||
}
|
||||
this.wordPos = length;
|
||||
}
|
||||
|
||||
// Token: 0x0600B59A RID: 46490 RVA: 0x0027B358 File Offset: 0x00279558
|
||||
[Token(Token = "0x600B59A")]
|
||||
[Address(RVA = "0x1C30240", Offset = "0x1C2F040", VA = "0x181C30240", Slot = "16")]
|
||||
public virtual long DoFinal()
|
||||
{
|
||||
int num = this.wordPos;
|
||||
uint num2;
|
||||
num2 -= (uint)num;
|
||||
long num3 = this.m;
|
||||
this.m = num3;
|
||||
this.Reset();
|
||||
this.ProcessMessageWord();
|
||||
return this.v3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B59B RID: 46491 RVA: 0x0027B390 File Offset: 0x00279590
|
||||
[Token(Token = "0x600B59B")]
|
||||
[Address(RVA = "0x1C301F0", Offset = "0x1C2EFF0", VA = "0x181C301F0", Slot = "17")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
// Token: 0x0600B59C RID: 46492 RVA: 0x0027B3A0 File Offset: 0x002795A0
|
||||
[Token(Token = "0x600B59C")]
|
||||
[Address(RVA = "0x1C304A0", Offset = "0x1C2F2A0", VA = "0x181C304A0", Slot = "18")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
long num = this.k0;
|
||||
long num2 = this.k1;
|
||||
this.v0 = num;
|
||||
num = num2;
|
||||
this.v1 = num;
|
||||
this.v2 = num;
|
||||
int num3 = 0;
|
||||
this.v3 = num2;
|
||||
this.m = (long)num3;
|
||||
this.wordPos = num3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B59D RID: 46493 RVA: 0x0027B3EC File Offset: 0x002795EC
|
||||
[Token(Token = "0x600B59D")]
|
||||
[Address(RVA = "0x1C30460", Offset = "0x1C2F260", VA = "0x181C30460", Slot = "19")]
|
||||
protected virtual void ProcessMessageWord()
|
||||
{
|
||||
this.ProcessMessageWord();
|
||||
long num = this.m;
|
||||
}
|
||||
|
||||
// Token: 0x0600B59E RID: 46494 RVA: 0x0027B408 File Offset: 0x00279608
|
||||
[Token(Token = "0x600B59E")]
|
||||
[Address(RVA = "0x1C2FF40", Offset = "0x1C2ED40", VA = "0x181C2FF40", Slot = "20")]
|
||||
protected virtual void ApplySipRounds(int n)
|
||||
{
|
||||
long num = this.v0;
|
||||
long num2 = this.v1;
|
||||
long num3 = this.v2;
|
||||
long num4 = this.v3;
|
||||
if (n > 0)
|
||||
{
|
||||
num += num2;
|
||||
num3 += num4;
|
||||
num3 += num2;
|
||||
num = num3;
|
||||
num += num4;
|
||||
num = num3;
|
||||
num3 = num;
|
||||
while (n != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
this.v0 = num;
|
||||
this.v1 = num2;
|
||||
this.v2 = num3;
|
||||
this.v3 = num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B59F RID: 46495 RVA: 0x0027B46C File Offset: 0x0027966C
|
||||
[Token(Token = "0x600B59F")]
|
||||
[Address(RVA = "0x1C30500", Offset = "0x1C2F300", VA = "0x181C30500")]
|
||||
protected static long RotateLeft(long x, int n)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x04007340 RID: 29504
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007340")]
|
||||
protected readonly int c;
|
||||
|
||||
// Token: 0x04007341 RID: 29505
|
||||
[FieldOffset(Offset = "0x14")]
|
||||
[Token(Token = "0x4007341")]
|
||||
protected readonly int d;
|
||||
|
||||
// Token: 0x04007342 RID: 29506
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007342")]
|
||||
protected long k0;
|
||||
|
||||
// Token: 0x04007343 RID: 29507
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007343")]
|
||||
protected long k1;
|
||||
|
||||
// Token: 0x04007344 RID: 29508
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007344")]
|
||||
protected long v0;
|
||||
|
||||
// Token: 0x04007345 RID: 29509
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007345")]
|
||||
protected long v1;
|
||||
|
||||
// Token: 0x04007346 RID: 29510
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007346")]
|
||||
protected long v2;
|
||||
|
||||
// Token: 0x04007347 RID: 29511
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007347")]
|
||||
protected long v3;
|
||||
|
||||
// Token: 0x04007348 RID: 29512
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4007348")]
|
||||
protected long m;
|
||||
|
||||
// Token: 0x04007349 RID: 29513
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4007349")]
|
||||
protected int wordPos;
|
||||
|
||||
// Token: 0x0400734A RID: 29514
|
||||
[FieldOffset(Offset = "0x54")]
|
||||
[Token(Token = "0x400734A")]
|
||||
protected int wordCount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C55 RID: 7253
|
||||
[Token(Token = "0x2001C55")]
|
||||
public class SkeinMac : IMac
|
||||
{
|
||||
// Token: 0x0600B5A0 RID: 46496 RVA: 0x0027B47C File Offset: 0x0027967C
|
||||
[Token(Token = "0x600B5A0")]
|
||||
[Address(RVA = "0x1C30B60", Offset = "0x1C2F960", VA = "0x181C30B60")]
|
||||
public SkeinMac(int stateSizeBits, int digestSizeBits)
|
||||
{
|
||||
SkeinEngine skeinEngine = new SkeinEngine(stateSizeBits, digestSizeBits);
|
||||
this.engine = skeinEngine;
|
||||
}
|
||||
|
||||
// Token: 0x0600B5A1 RID: 46497 RVA: 0x0027B4A0 File Offset: 0x002796A0
|
||||
[Token(Token = "0x600B5A1")]
|
||||
[Address(RVA = "0x1C30AE0", Offset = "0x1C2F8E0", VA = "0x181C30AE0")]
|
||||
public SkeinMac(SkeinMac mac)
|
||||
{
|
||||
SkeinEngine skeinEngine = new SkeinEngine(mac.engine);
|
||||
this.engine = skeinEngine;
|
||||
}
|
||||
|
||||
// Token: 0x17001C96 RID: 7318
|
||||
// (get) Token: 0x0600B5A2 RID: 46498 RVA: 0x0027B4CC File Offset: 0x002796CC
|
||||
[Token(Token = "0x17001C96")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B5A2")]
|
||||
[Address(RVA = "0x1C30BE0", Offset = "0x1C2F9E0", VA = "0x181C30BE0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
object[] array = new object[4];
|
||||
if ("Skein-MAC-" != 0)
|
||||
{
|
||||
}
|
||||
array[0] = "Skein-MAC-";
|
||||
int blockSize = this.engine.BlockSize;
|
||||
if (blockSize != 0)
|
||||
{
|
||||
}
|
||||
array[1] = blockSize;
|
||||
if ("-" != 0)
|
||||
{
|
||||
}
|
||||
array[2] = "-";
|
||||
int outputSizeBytes = this.engine.outputSizeBytes;
|
||||
if (outputSizeBytes != 0)
|
||||
{
|
||||
}
|
||||
array[3] = outputSizeBytes;
|
||||
return string.Concat(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B5A3 RID: 46499 RVA: 0x0027B544 File Offset: 0x00279744
|
||||
[Token(Token = "0x600B5A3")]
|
||||
[Address(RVA = "0x1C307E0", Offset = "0x1C2F5E0", VA = "0x181C307E0", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B5A3)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.SkeinMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_64:
|
||||
stloc:ArgumentException(var_15_6E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Skein MAC requires a key parameter.")))
|
||||
}
|
||||
|
||||
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: 0x0600B5A4 RID: 46500 RVA: 0x0027B5C0 File Offset: 0x002797C0
|
||||
[Token(Token = "0x600B5A4")]
|
||||
[Address(RVA = "0x40DB30", Offset = "0x40C930", VA = "0x18040DB30", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.engine.outputSizeBytes;
|
||||
}
|
||||
|
||||
// Token: 0x0600B5A5 RID: 46501 RVA: 0x0027B5E0 File Offset: 0x002797E0
|
||||
[Token(Token = "0x600B5A5")]
|
||||
[Address(RVA = "0x1C30AA0", Offset = "0x1C2F8A0", VA = "0x181C30AA0", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
this.engine.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x0600B5A6 RID: 46502 RVA: 0x0027B600 File Offset: 0x00279800
|
||||
[Token(Token = "0x600B5A6")]
|
||||
[Address(RVA = "0x1C30AC0", Offset = "0x1C2F8C0", VA = "0x181C30AC0", Slot = "7")]
|
||||
public void Update(byte inByte)
|
||||
{
|
||||
this.engine.Update(inByte);
|
||||
}
|
||||
|
||||
// Token: 0x0600B5A7 RID: 46503 RVA: 0x0027B620 File Offset: 0x00279820
|
||||
[Token(Token = "0x600B5A7")]
|
||||
[Address(RVA = "0x1C30790", Offset = "0x1C2F590", VA = "0x181C30790", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
this.engine.Update(input, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B5A8 RID: 46504 RVA: 0x0027B644 File Offset: 0x00279844
|
||||
[Token(Token = "0x600B5A8")]
|
||||
[Address(RVA = "0x1C307C0", Offset = "0x1C2F5C0", VA = "0x181C307C0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
return this.engine.DoFinal(output, outOff);
|
||||
}
|
||||
|
||||
// Token: 0x0400734B RID: 29515
|
||||
[Token(Token = "0x400734B")]
|
||||
public const int SKEIN_256 = 256;
|
||||
|
||||
// Token: 0x0400734C RID: 29516
|
||||
[Token(Token = "0x400734C")]
|
||||
public const int SKEIN_512 = 512;
|
||||
|
||||
// Token: 0x0400734D RID: 29517
|
||||
[Token(Token = "0x400734D")]
|
||||
public const int SKEIN_1024 = 1024;
|
||||
|
||||
// Token: 0x0400734E RID: 29518
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400734E")]
|
||||
private readonly SkeinEngine engine;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,337 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C56 RID: 7254
|
||||
[Token(Token = "0x2001C56")]
|
||||
public class VmpcMac : IMac
|
||||
{
|
||||
// Token: 0x0600B5A9 RID: 46505 RVA: 0x0027B664 File Offset: 0x00279864
|
||||
[Token(Token = "0x600B5A9")]
|
||||
[Address(RVA = "0x1C32D40", Offset = "0x1C31B40", VA = "0x181C32D40", Slot = "11")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
byte[] p = this.P;
|
||||
byte b = this.n;
|
||||
int length = p.Length;
|
||||
byte b2 = this.s;
|
||||
byte b3;
|
||||
b3 += b2;
|
||||
byte b4;
|
||||
this.s = b4;
|
||||
byte b5 = this.x3;
|
||||
byte b6 = this.x4;
|
||||
b6 += b5;
|
||||
uint num;
|
||||
b6 = (byte)((uint)b6 + num);
|
||||
b3 = b6;
|
||||
byte b7;
|
||||
this.x4 = b7;
|
||||
b7 = (byte)((uint)b7 + num);
|
||||
b3 = b7;
|
||||
byte b8;
|
||||
this.x3 = b8;
|
||||
byte b9 = this.x1;
|
||||
b8 = (byte)((uint)b8 + num);
|
||||
b3 = b8;
|
||||
byte b10;
|
||||
this.x2 = b10;
|
||||
b10 = b4;
|
||||
b10 += b9;
|
||||
b10 = (byte)((uint)b10 + num);
|
||||
b3 = b10;
|
||||
byte[] t = this.T;
|
||||
byte b11;
|
||||
this.x1 = b11;
|
||||
byte b12 = this.g;
|
||||
byte[] t2 = this.T;
|
||||
byte b13 = this.g;
|
||||
byte[] t3 = this.T;
|
||||
byte b14 = this.g;
|
||||
byte[] t4 = this.T;
|
||||
byte b15 = this.g;
|
||||
byte b16 = this.g;
|
||||
byte[] p2 = this.P;
|
||||
this.g = b16;
|
||||
byte b17 = this.n;
|
||||
int length2 = p2.Length;
|
||||
byte b18 = this.s;
|
||||
byte[] p3 = this.P;
|
||||
byte b19 = this.s;
|
||||
num += (uint)1;
|
||||
int num2 = 0;
|
||||
byte[] p4 = this.P;
|
||||
int length3 = p4.Length;
|
||||
byte[] t5 = this.T;
|
||||
byte b20;
|
||||
byte b21;
|
||||
b20 += b21;
|
||||
byte b22 = this.s;
|
||||
b20 += b22;
|
||||
byte b23;
|
||||
this.s = b23;
|
||||
int length4 = p4.Length;
|
||||
byte[] p5 = this.P;
|
||||
byte b24 = this.s;
|
||||
num2++;
|
||||
byte[] array = new byte[20];
|
||||
int num3 = 0;
|
||||
byte[] p6 = this.P;
|
||||
int length5 = p6.Length;
|
||||
byte b25 = this.s;
|
||||
byte b26;
|
||||
b26 += b25;
|
||||
byte b27;
|
||||
this.s = b27;
|
||||
int length6 = p6.Length;
|
||||
int length7 = this.P.Length;
|
||||
byte b28 = this.s;
|
||||
byte[] p7 = this.P;
|
||||
byte b29 = this.s;
|
||||
num3++;
|
||||
int length8 = array.Length;
|
||||
int num4 = 0;
|
||||
Array.Copy(array, num4, output, outOff, length8);
|
||||
return array.Length;
|
||||
}
|
||||
|
||||
// Token: 0x17001C97 RID: 7319
|
||||
// (get) Token: 0x0600B5AA RID: 46506 RVA: 0x0027B888 File Offset: 0x00279A88
|
||||
[Token(Token = "0x17001C97")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B5AA")]
|
||||
[Address(RVA = "0x1C33AA0", Offset = "0x1C328A0", VA = "0x181C33AA0", Slot = "12")]
|
||||
get
|
||||
{
|
||||
return "VMPC-MAC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B5AB RID: 46507 RVA: 0x0027B89C File Offset: 0x00279A9C
|
||||
[Token(Token = "0x600B5AB")]
|
||||
[Address(RVA = "0x4B5D20", Offset = "0x4B4B20", VA = "0x1804B5D20", Slot = "13")]
|
||||
public virtual int GetMacSize()
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
// Token: 0x0600B5AC RID: 46508 RVA: 0x0027B8AC File Offset: 0x00279AAC
|
||||
[Token(Token = "0x600B5AC")]
|
||||
[Address(RVA = "0x1C33400", Offset = "0x1C32200", VA = "0x181C33400", Slot = "14")]
|
||||
public virtual void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B5AC)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.VmpcMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_51:
|
||||
stloc:ArgumentException(var_8_60, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("VMPC-MAC requires 1 to 768 bytes of IV"), ldstr:string("parameters")))
|
||||
}
|
||||
|
||||
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.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.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: 0x0600B5AD RID: 46509 RVA: 0x0027B91C File Offset: 0x00279B1C
|
||||
[Token(Token = "0x600B5AD")]
|
||||
[Address(RVA = "0x1C33AD0", Offset = "0x1C328D0", VA = "0x181C33AD0")]
|
||||
private void initKey(byte[] keyBytes, byte[] ivBytes)
|
||||
{
|
||||
this.s = (byte)((ulong)0L);
|
||||
byte[] array = new byte[256];
|
||||
int num = 0;
|
||||
this.P = array;
|
||||
byte[] p = this.P;
|
||||
num++;
|
||||
byte[] p2 = this.P;
|
||||
int length = p2.Length;
|
||||
byte b = p[keyBytes];
|
||||
byte b2;
|
||||
b += b2;
|
||||
byte b3 = this.s;
|
||||
b += b3;
|
||||
byte b4;
|
||||
this.s = b4;
|
||||
int length2 = p2.Length;
|
||||
byte[] p3 = this.P;
|
||||
byte b5 = this.s;
|
||||
num++;
|
||||
byte[] p4 = this.P;
|
||||
int length3 = p4.Length;
|
||||
int length4 = ivBytes.Length;
|
||||
byte b6;
|
||||
byte b7;
|
||||
b6 += b7;
|
||||
byte b8 = this.s;
|
||||
b6 += b8;
|
||||
byte b9;
|
||||
this.s = b9;
|
||||
int length5 = p4.Length;
|
||||
byte[] p5 = this.P;
|
||||
byte b10 = this.s;
|
||||
num++;
|
||||
this.n = (byte)((ulong)0L);
|
||||
}
|
||||
|
||||
// Token: 0x0600B5AE RID: 46510 RVA: 0x0027BA14 File Offset: 0x00279C14
|
||||
[Token(Token = "0x600B5AE")]
|
||||
[Address(RVA = "0x1C33660", Offset = "0x1C32460", VA = "0x181C33660", Slot = "15")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
byte[] array = this.workingIV;
|
||||
byte[] array2 = this.workingKey;
|
||||
this.initKey(array2, array);
|
||||
this.g = (byte)((ulong)0L);
|
||||
this.x1 = (byte)((ulong)0L);
|
||||
byte[] array3 = new byte[32];
|
||||
this.T = array3;
|
||||
int num = 0;
|
||||
byte[] t = this.T;
|
||||
num++;
|
||||
}
|
||||
|
||||
// Token: 0x0600B5AF RID: 46511 RVA: 0x0027BA6C File Offset: 0x00279C6C
|
||||
[Token(Token = "0x600B5AF")]
|
||||
[Address(RVA = "0x1C33700", Offset = "0x1C32500", VA = "0x181C33700", Slot = "16")]
|
||||
public virtual void Update(byte input)
|
||||
{
|
||||
byte[] p = this.P;
|
||||
byte b = this.n;
|
||||
int length = p.Length;
|
||||
byte b2 = this.s;
|
||||
byte b3;
|
||||
b3 += b2;
|
||||
byte b4;
|
||||
this.s = b4;
|
||||
int length2 = p.Length;
|
||||
byte b5 = this.x3;
|
||||
byte b6 = this.x4;
|
||||
b6 += b5;
|
||||
byte b7;
|
||||
this.x4 = b7;
|
||||
byte b8;
|
||||
this.x3 = b8;
|
||||
b7 = b8;
|
||||
byte b9;
|
||||
this.x2 = b9;
|
||||
byte b10 = this.s;
|
||||
b10 += b9;
|
||||
b9 = b10;
|
||||
byte[] t = this.T;
|
||||
byte b11;
|
||||
this.x1 = b11;
|
||||
byte b12 = this.g;
|
||||
byte[] t2 = this.T;
|
||||
byte b13 = this.g;
|
||||
byte b14 = this.x2;
|
||||
byte[] t3 = this.T;
|
||||
byte b15 = this.g;
|
||||
byte b16 = this.x3;
|
||||
byte[] t4 = this.T;
|
||||
byte b17 = this.g;
|
||||
byte b18 = this.g;
|
||||
this.g = b18;
|
||||
byte[] p2 = this.P;
|
||||
byte b19 = this.n;
|
||||
int length3 = p2.Length;
|
||||
byte b20 = this.s;
|
||||
byte b21;
|
||||
p2[0] = b21;
|
||||
byte[] p3 = this.P;
|
||||
byte b22 = this.s;
|
||||
}
|
||||
|
||||
// Token: 0x0600B5B0 RID: 46512 RVA: 0x0027BBA4 File Offset: 0x00279DA4
|
||||
[Token(Token = "0x600B5B0")]
|
||||
[Address(RVA = "0x1C32C50", Offset = "0x1C31A50", VA = "0x181C32C50", Slot = "17")]
|
||||
public virtual void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
if (len > 0)
|
||||
{
|
||||
this.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B5B1 RID: 46513 RVA: 0x0027BBC4 File Offset: 0x00279DC4
|
||||
[Token(Token = "0x600B5B1")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public VmpcMac()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400734F RID: 29519
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400734F")]
|
||||
private byte g;
|
||||
|
||||
// Token: 0x04007350 RID: 29520
|
||||
[FieldOffset(Offset = "0x11")]
|
||||
[Token(Token = "0x4007350")]
|
||||
private byte n;
|
||||
|
||||
// Token: 0x04007351 RID: 29521
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007351")]
|
||||
private byte[] P;
|
||||
|
||||
// Token: 0x04007352 RID: 29522
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007352")]
|
||||
private byte s;
|
||||
|
||||
// Token: 0x04007353 RID: 29523
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007353")]
|
||||
private byte[] T;
|
||||
|
||||
// Token: 0x04007354 RID: 29524
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007354")]
|
||||
private byte[] workingIV;
|
||||
|
||||
// Token: 0x04007355 RID: 29525
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007355")]
|
||||
private byte[] workingKey;
|
||||
|
||||
// Token: 0x04007356 RID: 29526
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007356")]
|
||||
private byte x1;
|
||||
|
||||
// Token: 0x04007357 RID: 29527
|
||||
[FieldOffset(Offset = "0x41")]
|
||||
[Token(Token = "0x4007357")]
|
||||
private byte x2;
|
||||
|
||||
// Token: 0x04007358 RID: 29528
|
||||
[FieldOffset(Offset = "0x42")]
|
||||
[Token(Token = "0x4007358")]
|
||||
private byte x3;
|
||||
|
||||
// Token: 0x04007359 RID: 29529
|
||||
[FieldOffset(Offset = "0x43")]
|
||||
[Token(Token = "0x4007359")]
|
||||
private byte x4;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user