m
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: 0x02001D29 RID: 7465
|
||||
[Token(Token = "0x2001D29")]
|
||||
public class CMac : IMac
|
||||
{
|
||||
// Token: 0x0600B8EC RID: 47340 RVA: 0x00281AEC File Offset: 0x0027FCEC
|
||||
[Token(Token = "0x600B8EC")]
|
||||
[Address(RVA = "0x25B1740", Offset = "0x25B0740", VA = "0x1825B1740")]
|
||||
public CMac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B8ED RID: 47341 RVA: 0x00281B00 File Offset: 0x0027FD00
|
||||
[Token(Token = "0x600B8ED")]
|
||||
[Address(RVA = "0x25B17B0", Offset = "0x25B07B0", VA = "0x1825B17B0")]
|
||||
public CMac(IBlockCipher cipher, int macSizeInBits)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B8ED)
|
||||
|
||||
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: 0x17001D26 RID: 7462
|
||||
// (get) Token: 0x0600B8EE RID: 47342 RVA: 0x00281B7C File Offset: 0x0027FD7C
|
||||
[Token(Token = "0x17001D26")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B8EE")]
|
||||
[Address(RVA = "0x25B1A10", Offset = "0x25B0A10", VA = "0x1825B1A10", Slot = "5")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B8EF RID: 47343 RVA: 0x00281B98 File Offset: 0x0027FD98
|
||||
[Token(Token = "0x600B8EF")]
|
||||
[Address(RVA = "0x25B1610", Offset = "0x25B0610", VA = "0x1825B1610")]
|
||||
private static int ShiftLeft(byte[] block, byte[] output)
|
||||
{
|
||||
int length = block.Length;
|
||||
byte b;
|
||||
b += b;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B8F0 RID: 47344 RVA: 0x00281BB8 File Offset: 0x0027FDB8
|
||||
[Token(Token = "0x600B8F0")]
|
||||
[Address(RVA = "0x25B12E0", Offset = "0x25B02E0", VA = "0x1825B12E0")]
|
||||
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: 0x0600B8F1 RID: 47345 RVA: 0x00281BF0 File Offset: 0x0027FDF0
|
||||
[Token(Token = "0x600B8F1")]
|
||||
[Address(RVA = "0x25B13F0", Offset = "0x25B03F0", VA = "0x1825B13F0", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B8F1)
|
||||
|
||||
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: 0x0600B8F2 RID: 47346 RVA: 0x00281C9C File Offset: 0x0027FE9C
|
||||
[Token(Token = "0x600B8F2")]
|
||||
[Address(RVA = "0x42B830", Offset = "0x42A830", VA = "0x18042B830", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8F3 RID: 47347 RVA: 0x00281CB0 File Offset: 0x0027FEB0
|
||||
[Token(Token = "0x600B8F3")]
|
||||
[Address(RVA = "0x25B1690", Offset = "0x25B0690", VA = "0x1825B1690", 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: 0x0600B8F4 RID: 47348 RVA: 0x00281CFC File Offset: 0x0027FEFC
|
||||
[Token(Token = "0x600B8F4")]
|
||||
[Address(RVA = "0x25B0EF0", Offset = "0x25AFEF0", VA = "0x1825B0EF0", 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: 0x0600B8F5 RID: 47349 RVA: 0x00281D64 File Offset: 0x0027FF64
|
||||
[Token(Token = "0x600B8F5")]
|
||||
[Address(RVA = "0x25B1100", Offset = "0x25B0100", VA = "0x1825B1100", 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: 0x0600B8F6 RID: 47350 RVA: 0x00281E30 File Offset: 0x00280030
|
||||
[Token(Token = "0x600B8F6")]
|
||||
[Address(RVA = "0x25B15A0", Offset = "0x25B05A0", VA = "0x1825B15A0", 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: 0x0400749E RID: 29854
|
||||
[Token(Token = "0x400749E")]
|
||||
private const byte CONSTANT_128 = 135;
|
||||
|
||||
// Token: 0x0400749F RID: 29855
|
||||
[Token(Token = "0x400749F")]
|
||||
private const byte CONSTANT_64 = 27;
|
||||
|
||||
// Token: 0x040074A0 RID: 29856
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074A0")]
|
||||
private byte[] ZEROES;
|
||||
|
||||
// Token: 0x040074A1 RID: 29857
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074A1")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040074A2 RID: 29858
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074A2")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040074A3 RID: 29859
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074A3")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040074A4 RID: 29860
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074A4")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040074A5 RID: 29861
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40074A5")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x040074A6 RID: 29862
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40074A6")]
|
||||
private byte[] L;
|
||||
|
||||
// Token: 0x040074A7 RID: 29863
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40074A7")]
|
||||
private byte[] Lu;
|
||||
|
||||
// Token: 0x040074A8 RID: 29864
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40074A8")]
|
||||
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: 0x02001D2A RID: 7466
|
||||
[Token(Token = "0x2001D2A")]
|
||||
public class CbcBlockCipherMac : IMac
|
||||
{
|
||||
// Token: 0x0600B8F7 RID: 47351 RVA: 0x00281E6C File Offset: 0x0028006C
|
||||
[Token(Token = "0x600B8F7")]
|
||||
[Address(RVA = "0x25B21D0", Offset = "0x25B11D0", VA = "0x1825B21D0")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B8F8 RID: 47352 RVA: 0x00281E80 File Offset: 0x00280080
|
||||
[Token(Token = "0x600B8F8")]
|
||||
[Address(RVA = "0x25B2120", Offset = "0x25B1120", VA = "0x1825B2120")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher, IBlockCipherPadding padding)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B8F9 RID: 47353 RVA: 0x00281E94 File Offset: 0x00280094
|
||||
[Token(Token = "0x600B8F9")]
|
||||
[Address(RVA = "0x25B21B0", Offset = "0x25B11B0", VA = "0x1825B21B0")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher, int macSizeInBits)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B8FA RID: 47354 RVA: 0x00281EA4 File Offset: 0x002800A4
|
||||
[Token(Token = "0x600B8FA")]
|
||||
[Address(RVA = "0x25B2010", Offset = "0x25B1010", VA = "0x1825B2010")]
|
||||
public CbcBlockCipherMac(IBlockCipher cipher, int macSizeInBits, IBlockCipherPadding padding)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B8FA)
|
||||
|
||||
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: 0x17001D27 RID: 7463
|
||||
// (get) Token: 0x0600B8FB RID: 47355 RVA: 0x00281EFC File Offset: 0x002800FC
|
||||
[Token(Token = "0x17001D27")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B8FB")]
|
||||
[Address(RVA = "0x25B2250", Offset = "0x25B1250", VA = "0x1825B2250", Slot = "5")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B8FC RID: 47356 RVA: 0x00281F18 File Offset: 0x00280118
|
||||
[Token(Token = "0x600B8FC")]
|
||||
[Address(RVA = "0x25B1E30", Offset = "0x25B0E30", VA = "0x1825B1E30", 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: 0x0600B8FD RID: 47357 RVA: 0x00281F5C File Offset: 0x0028015C
|
||||
[Token(Token = "0x600B8FD")]
|
||||
[Address(RVA = "0x4257C0", Offset = "0x4247C0", VA = "0x1804257C0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8FE RID: 47358 RVA: 0x00281F70 File Offset: 0x00280170
|
||||
[Token(Token = "0x600B8FE")]
|
||||
[Address(RVA = "0x25B1F60", Offset = "0x25B0F60", VA = "0x1825B1F60", 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: 0x0600B8FF RID: 47359 RVA: 0x00281FB4 File Offset: 0x002801B4
|
||||
[Token(Token = "0x600B8FF")]
|
||||
[Address(RVA = "0x25B1A60", Offset = "0x25B0A60", VA = "0x1825B1A60", 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: 0x0600B900 RID: 47360 RVA: 0x0028201C File Offset: 0x0028021C
|
||||
[Token(Token = "0x600B900")]
|
||||
[Address(RVA = "0x25B1C60", Offset = "0x25B0C60", VA = "0x1825B1C60", 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: 0x0600B901 RID: 47361 RVA: 0x002820F0 File Offset: 0x002802F0
|
||||
[Token(Token = "0x600B901")]
|
||||
[Address(RVA = "0x25B1EF0", Offset = "0x25B0EF0", VA = "0x1825B1EF0", 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: 0x040074A9 RID: 29865
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074A9")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040074AA RID: 29866
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074AA")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040074AB RID: 29867
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074AB")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040074AC RID: 29868
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074AC")]
|
||||
private IBlockCipherPadding padding;
|
||||
|
||||
// Token: 0x040074AD RID: 29869
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074AD")]
|
||||
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: 0x02001D2C RID: 7468
|
||||
[Token(Token = "0x2001D2C")]
|
||||
public class CfbBlockCipherMac : IMac
|
||||
{
|
||||
// Token: 0x0600B90A RID: 47370 RVA: 0x00282320 File Offset: 0x00280520
|
||||
[Token(Token = "0x600B90A")]
|
||||
[Address(RVA = "0x25B4820", Offset = "0x25B3820", VA = "0x1825B4820")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B90B RID: 47371 RVA: 0x00282338 File Offset: 0x00280538
|
||||
[Token(Token = "0x600B90B")]
|
||||
[Address(RVA = "0x25B48A0", Offset = "0x25B38A0", VA = "0x1825B48A0")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher, IBlockCipherPadding padding)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B90C RID: 47372 RVA: 0x0028234C File Offset: 0x0028054C
|
||||
[Token(Token = "0x600B90C")]
|
||||
[Address(RVA = "0x25B4800", Offset = "0x25B3800", VA = "0x1825B4800")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher, int cfbBitSize, int macSizeInBits)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B90D RID: 47373 RVA: 0x0028235C File Offset: 0x0028055C
|
||||
[Token(Token = "0x600B90D")]
|
||||
[Address(RVA = "0x25B4930", Offset = "0x25B3930", VA = "0x1825B4930")]
|
||||
public CfbBlockCipherMac(IBlockCipher cipher, int cfbBitSize, int macSizeInBits, IBlockCipherPadding padding)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B90D)
|
||||
|
||||
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: 0x17001D2A RID: 7466
|
||||
// (get) Token: 0x0600B90E RID: 47374 RVA: 0x00282408 File Offset: 0x00280608
|
||||
[Token(Token = "0x17001D2A")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B90E")]
|
||||
[Address(RVA = "0x25B4B00", Offset = "0x25B3B00", VA = "0x1825B4B00", Slot = "5")]
|
||||
get
|
||||
{
|
||||
MacCFBBlockCipher macCFBBlockCipher = this.cipher;
|
||||
IBlockCipher blockCipher = macCFBBlockCipher.cipher;
|
||||
int blockSize = macCFBBlockCipher.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B90F RID: 47375 RVA: 0x00282434 File Offset: 0x00280634
|
||||
[Token(Token = "0x600B90F")]
|
||||
[Address(RVA = "0x25B46A0", Offset = "0x25B36A0", VA = "0x1825B46A0", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
this.Reset();
|
||||
this.cipher.Init(true, parameters);
|
||||
}
|
||||
|
||||
// Token: 0x0600B910 RID: 47376 RVA: 0x0028245C File Offset: 0x0028065C
|
||||
[Token(Token = "0x600B910")]
|
||||
[Address(RVA = "0x42B830", Offset = "0x42A830", VA = "0x18042B830", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B911 RID: 47377 RVA: 0x00282470 File Offset: 0x00280670
|
||||
[Token(Token = "0x600B911")]
|
||||
[Address(RVA = "0x25B4770", Offset = "0x25B3770", VA = "0x1825B4770", 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: 0x0600B912 RID: 47378 RVA: 0x002824CC File Offset: 0x002806CC
|
||||
[Token(Token = "0x600B912")]
|
||||
[Address(RVA = "0x25B4330", Offset = "0x25B3330", VA = "0x1825B4330", 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: 0x0600B913 RID: 47379 RVA: 0x0028257C File Offset: 0x0028077C
|
||||
[Token(Token = "0x600B913")]
|
||||
[Address(RVA = "0x25B44A0", Offset = "0x25B34A0", VA = "0x1825B44A0", 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: 0x0600B914 RID: 47380 RVA: 0x00282694 File Offset: 0x00280894
|
||||
[Token(Token = "0x600B914")]
|
||||
[Address(RVA = "0x25B46E0", Offset = "0x25B36E0", VA = "0x1825B46E0", 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: 0x040074B3 RID: 29875
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074B3")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040074B4 RID: 29876
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074B4")]
|
||||
private byte[] Buffer;
|
||||
|
||||
// Token: 0x040074B5 RID: 29877
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074B5")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040074B6 RID: 29878
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074B6")]
|
||||
private MacCFBBlockCipher cipher;
|
||||
|
||||
// Token: 0x040074B7 RID: 29879
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074B7")]
|
||||
private IBlockCipherPadding padding;
|
||||
|
||||
// Token: 0x040074B8 RID: 29880
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40074B8")]
|
||||
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: 0x02001D2D RID: 7469
|
||||
[Token(Token = "0x2001D2D")]
|
||||
public class Dstu7564Mac : IMac
|
||||
{
|
||||
// Token: 0x17001D2B RID: 7467
|
||||
// (get) Token: 0x0600B915 RID: 47381 RVA: 0x002826EC File Offset: 0x002808EC
|
||||
[Token(Token = "0x17001D2B")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B915")]
|
||||
[Address(RVA = "0x25B7660", Offset = "0x25B6660", VA = "0x1825B7660", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "DSTU7564Mac";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B916 RID: 47382 RVA: 0x00282700 File Offset: 0x00280900
|
||||
[Token(Token = "0x600B916")]
|
||||
[Address(RVA = "0x25B75E0", Offset = "0x25B65E0", VA = "0x1825B75E0")]
|
||||
public Dstu7564Mac(int macSizeBits)
|
||||
{
|
||||
Dstu7564Digest dstu7564Digest = new Dstu7564Digest(macSizeBits);
|
||||
this.engine = dstu7564Digest;
|
||||
this.macSize = macSizeBits;
|
||||
}
|
||||
|
||||
// Token: 0x0600B917 RID: 47383 RVA: 0x00282728 File Offset: 0x00280928
|
||||
[Token(Token = "0x600B917")]
|
||||
[Address(RVA = "0x25B7030", Offset = "0x25B6030", VA = "0x1825B7030", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B917)
|
||||
|
||||
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: 0x0600B918 RID: 47384 RVA: 0x002827B4 File Offset: 0x002809B4
|
||||
[Token(Token = "0x600B918")]
|
||||
[Address(RVA = "0x411540", Offset = "0x410540", VA = "0x180411540", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B919 RID: 47385 RVA: 0x002827C8 File Offset: 0x002809C8
|
||||
[Token(Token = "0x600B919")]
|
||||
[Address(RVA = "0x25B6CE0", Offset = "0x25B5CE0", VA = "0x1825B6CE0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B919)
|
||||
|
||||
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: 0x0600B91A RID: 47386 RVA: 0x00282810 File Offset: 0x00280A10
|
||||
[Token(Token = "0x600B91A")]
|
||||
[Address(RVA = "0x25B75A0", Offset = "0x25B65A0", VA = "0x1825B75A0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
int byteLength = this.engine.GetByteLength();
|
||||
}
|
||||
|
||||
// Token: 0x0600B91B RID: 47387 RVA: 0x00282830 File Offset: 0x00280A30
|
||||
[Token(Token = "0x600B91B")]
|
||||
[Address(RVA = "0x25B6DE0", Offset = "0x25B5DE0", VA = "0x1825B6DE0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B91B)
|
||||
|
||||
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: 0x0600B91C RID: 47388 RVA: 0x00282918 File Offset: 0x00280B18
|
||||
[Token(Token = "0x600B91C")]
|
||||
[Address(RVA = "0x25B7530", Offset = "0x25B6530", VA = "0x1825B7530", 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: 0x0600B91D RID: 47389 RVA: 0x00282954 File Offset: 0x00280B54
|
||||
[Token(Token = "0x600B91D")]
|
||||
[Address(RVA = "0x25B7400", Offset = "0x25B6400", VA = "0x1825B7400")]
|
||||
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: 0x0600B91E RID: 47390 RVA: 0x002829D8 File Offset: 0x00280BD8
|
||||
[Token(Token = "0x600B91E")]
|
||||
[Address(RVA = "0x25B7250", Offset = "0x25B6250", VA = "0x1825B7250")]
|
||||
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: 0x040074B9 RID: 29881
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074B9")]
|
||||
private Dstu7564Digest engine;
|
||||
|
||||
// Token: 0x040074BA RID: 29882
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074BA")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x040074BB RID: 29883
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074BB")]
|
||||
private ulong inputLength;
|
||||
|
||||
// Token: 0x040074BC RID: 29884
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074BC")]
|
||||
private byte[] paddedKey;
|
||||
|
||||
// Token: 0x040074BD RID: 29885
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074BD")]
|
||||
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: 0x02001D2E RID: 7470
|
||||
[Token(Token = "0x2001D2E")]
|
||||
public class Dstu7624Mac : IMac
|
||||
{
|
||||
// Token: 0x0600B91F RID: 47391 RVA: 0x00282AA8 File Offset: 0x00280CA8
|
||||
[Token(Token = "0x600B91F")]
|
||||
[Address(RVA = "0x25B7DB0", Offset = "0x25B6DB0", VA = "0x1825B7DB0")]
|
||||
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: 0x0600B920 RID: 47392 RVA: 0x00282B2C File Offset: 0x00280D2C
|
||||
[Token(Token = "0x600B920")]
|
||||
[Address(RVA = "0x25B79B0", Offset = "0x25B69B0", VA = "0x1825B79B0", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B920)
|
||||
|
||||
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: 0x17001D2C RID: 7468
|
||||
// (get) Token: 0x0600B921 RID: 47393 RVA: 0x00282B70 File Offset: 0x00280D70
|
||||
[Token(Token = "0x17001D2C")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B921")]
|
||||
[Address(RVA = "0x25B7E90", Offset = "0x25B6E90", VA = "0x1825B7E90", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "Dstu7624Mac";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B922 RID: 47394 RVA: 0x00282B84 File Offset: 0x00280D84
|
||||
[Token(Token = "0x600B922")]
|
||||
[Address(RVA = "0x40F000", Offset = "0x40E000", VA = "0x18040F000", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B923 RID: 47395 RVA: 0x00282B98 File Offset: 0x00280D98
|
||||
[Token(Token = "0x600B923")]
|
||||
[Address(RVA = "0x25B7C20", Offset = "0x25B6C20", VA = "0x1825B7C20", 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: 0x0600B924 RID: 47396 RVA: 0x00282BFC File Offset: 0x00280DFC
|
||||
[Token(Token = "0x600B924")]
|
||||
[Address(RVA = "0x25B7690", Offset = "0x25B6690", VA = "0x1825B7690", 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: 0x0600B925 RID: 47397 RVA: 0x00282C8C File Offset: 0x00280E8C
|
||||
[Token(Token = "0x600B925")]
|
||||
[Address(RVA = "0x25B7EC0", Offset = "0x25B6EC0", VA = "0x1825B7EC0")]
|
||||
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: 0x0600B926 RID: 47398 RVA: 0x00282CC4 File Offset: 0x00280EC4
|
||||
[Token(Token = "0x600B926")]
|
||||
[Address(RVA = "0x25B7CE0", Offset = "0x25B6CE0", VA = "0x1825B7CE0")]
|
||||
private void Xor(byte[] c, int cOff, byte[] input, int inOff, byte[] xorResult)
|
||||
{
|
||||
if (this.blockSize > 0)
|
||||
{
|
||||
byte b;
|
||||
input[0] = b;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B927 RID: 47399 RVA: 0x00282CE8 File Offset: 0x00280EE8
|
||||
[Token(Token = "0x600B927")]
|
||||
[Address(RVA = "0x25B7830", Offset = "0x25B6830", VA = "0x1825B7830", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B927)
|
||||
|
||||
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: 0x0600B928 RID: 47400 RVA: 0x00282D8C File Offset: 0x00280F8C
|
||||
[Token(Token = "0x600B928")]
|
||||
[Address(RVA = "0x25B7B40", Offset = "0x25B6B40", VA = "0x1825B7B40", 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: 0x040074BE RID: 29886
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074BE")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x040074BF RID: 29887
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074BF")]
|
||||
private Dstu7624Engine engine;
|
||||
|
||||
// Token: 0x040074C0 RID: 29888
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074C0")]
|
||||
private int blockSize;
|
||||
|
||||
// Token: 0x040074C1 RID: 29889
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074C1")]
|
||||
private byte[] c;
|
||||
|
||||
// Token: 0x040074C2 RID: 29890
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074C2")]
|
||||
private byte[] cTemp;
|
||||
|
||||
// Token: 0x040074C3 RID: 29891
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40074C3")]
|
||||
private byte[] kDelta;
|
||||
|
||||
// Token: 0x040074C4 RID: 29892
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40074C4")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040074C5 RID: 29893
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40074C5")]
|
||||
private int bufOff;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001D2F RID: 7471
|
||||
[Token(Token = "0x2001D2F")]
|
||||
public class GMac : IMac
|
||||
{
|
||||
// Token: 0x0600B929 RID: 47401 RVA: 0x00282E08 File Offset: 0x00281008
|
||||
[Token(Token = "0x600B929")]
|
||||
[Address(RVA = "0x25B93C0", Offset = "0x25B83C0", VA = "0x1825B93C0")]
|
||||
public GMac(GcmBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
this.macSizeBits = (int)((ulong)128L);
|
||||
}
|
||||
|
||||
// Token: 0x0600B92A RID: 47402 RVA: 0x00282E30 File Offset: 0x00281030
|
||||
[Token(Token = "0x600B92A")]
|
||||
[Address(RVA = "0x52CBA0", Offset = "0x52BBA0", VA = "0x18052CBA0")]
|
||||
public GMac(GcmBlockCipher cipher, int macSizeBits)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
this.macSizeBits = macSizeBits;
|
||||
}
|
||||
|
||||
// Token: 0x0600B92B RID: 47403 RVA: 0x00282E54 File Offset: 0x00281054
|
||||
[Token(Token = "0x600B92B")]
|
||||
[Address(RVA = "0x25B91C0", Offset = "0x25B81C0", VA = "0x1825B91C0", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B92B)
|
||||
|
||||
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: 0x17001D2D RID: 7469
|
||||
// (get) Token: 0x0600B92C RID: 47404 RVA: 0x00282E90 File Offset: 0x00281090
|
||||
[Token(Token = "0x17001D2D")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B92C")]
|
||||
[Address(RVA = "0x25B93F0", Offset = "0x25B83F0", VA = "0x1825B93F0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher.cipher;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B92D RID: 47405 RVA: 0x00282EB0 File Offset: 0x002810B0
|
||||
[Token(Token = "0x600B92D")]
|
||||
[Address(RVA = "0x25B91B0", Offset = "0x25B81B0", VA = "0x1825B91B0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSizeBits;
|
||||
}
|
||||
|
||||
// Token: 0x0600B92E RID: 47406 RVA: 0x00282EC4 File Offset: 0x002810C4
|
||||
[Token(Token = "0x600B92E")]
|
||||
[Address(RVA = "0x25B93A0", Offset = "0x25B83A0", VA = "0x1825B93A0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
this.cipher.ProcessAadByte(input);
|
||||
}
|
||||
|
||||
// Token: 0x0600B92F RID: 47407 RVA: 0x00282EE4 File Offset: 0x002810E4
|
||||
[Token(Token = "0x600B92F")]
|
||||
[Address(RVA = "0x25B90B0", Offset = "0x25B80B0", VA = "0x1825B90B0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
this.cipher.ProcessAadBytes(input, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B930 RID: 47408 RVA: 0x00282F08 File Offset: 0x00281108
|
||||
[Token(Token = "0x600B930")]
|
||||
[Address(RVA = "0x25B90E0", Offset = "0x25B80E0", VA = "0x1825B90E0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
return this.cipher.DoFinal(output, outOff);
|
||||
}
|
||||
|
||||
// Token: 0x0600B931 RID: 47409 RVA: 0x00282F30 File Offset: 0x00281130
|
||||
[Token(Token = "0x600B931")]
|
||||
[Address(RVA = "0x25B9380", Offset = "0x25B8380", VA = "0x1825B9380", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
this.cipher.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x040074C6 RID: 29894
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074C6")]
|
||||
private readonly GcmBlockCipher cipher;
|
||||
|
||||
// Token: 0x040074C7 RID: 29895
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074C7")]
|
||||
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: 0x02001D30 RID: 7472
|
||||
[Token(Token = "0x2001D30")]
|
||||
public class Gost28147Mac : IMac
|
||||
{
|
||||
// Token: 0x0600B932 RID: 47410 RVA: 0x00282F50 File Offset: 0x00281150
|
||||
[Token(Token = "0x600B932")]
|
||||
[Address(RVA = "0x25BC3E0", Offset = "0x25BB3E0", VA = "0x1825BC3E0")]
|
||||
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: 0x0600B933 RID: 47411 RVA: 0x00282FAC File Offset: 0x002811AC
|
||||
[Token(Token = "0x600B933")]
|
||||
[Address(RVA = "0x25BBD90", Offset = "0x25BAD90", VA = "0x1825BBD90")]
|
||||
private static int[] GenerateWorkingKey(byte[] userKey)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B933)
|
||||
|
||||
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: 0x0600B934 RID: 47412 RVA: 0x00282FF8 File Offset: 0x002811F8
|
||||
[Token(Token = "0x600B934")]
|
||||
[Address(RVA = "0x25BBE70", Offset = "0x25BAE70", VA = "0x1825BBE70", 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: 0x17001D2E RID: 7470
|
||||
// (get) Token: 0x0600B935 RID: 47413 RVA: 0x002830FC File Offset: 0x002812FC
|
||||
[Token(Token = "0x17001D2E")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B935")]
|
||||
[Address(RVA = "0x25BC540", Offset = "0x25BB540", VA = "0x1825BC540", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "Gost28147Mac";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B936 RID: 47414 RVA: 0x00283110 File Offset: 0x00281310
|
||||
[Token(Token = "0x600B936")]
|
||||
[Address(RVA = "0x680C20", Offset = "0x67FC20", VA = "0x180680C20", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B937 RID: 47415 RVA: 0x00283120 File Offset: 0x00281320
|
||||
[Token(Token = "0x600B937")]
|
||||
[Address(RVA = "0x25BC780", Offset = "0x25BB780", VA = "0x1825BC780")]
|
||||
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: 0x0600B938 RID: 47416 RVA: 0x0028315C File Offset: 0x0028135C
|
||||
[Token(Token = "0x600B938")]
|
||||
[Address(RVA = "0x25BC570", Offset = "0x25BB570", VA = "0x1825BC570")]
|
||||
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: 0x0600B939 RID: 47417 RVA: 0x0028318C File Offset: 0x0028138C
|
||||
[Token(Token = "0x600B939")]
|
||||
[Address(RVA = "0x25BC480", Offset = "0x25BB480", VA = "0x1825BC480")]
|
||||
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: 0x0600B93A RID: 47418 RVA: 0x002831C8 File Offset: 0x002813C8
|
||||
[Token(Token = "0x600B93A")]
|
||||
[Address(RVA = "0x25BC9C0", Offset = "0x25BB9C0", VA = "0x1825BC9C0")]
|
||||
private static void intTobytes(int num, byte[] output, int outOff)
|
||||
{
|
||||
int num2 = outOff + 1;
|
||||
}
|
||||
|
||||
// Token: 0x0600B93B RID: 47419 RVA: 0x002831E0 File Offset: 0x002813E0
|
||||
[Token(Token = "0x600B93B")]
|
||||
[Address(RVA = "0x25BBB10", Offset = "0x25BAB10", VA = "0x1825BBB10")]
|
||||
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: 0x0600B93C RID: 47420 RVA: 0x00283230 File Offset: 0x00281430
|
||||
[Token(Token = "0x600B93C")]
|
||||
[Address(RVA = "0x25BC2B0", Offset = "0x25BB2B0", VA = "0x1825BC2B0", 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: 0x0600B93D RID: 47421 RVA: 0x002832FC File Offset: 0x002814FC
|
||||
[Token(Token = "0x600B93D")]
|
||||
[Address(RVA = "0x25BB920", Offset = "0x25BA920", VA = "0x1825BB920", 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: 0x0600B93E RID: 47422 RVA: 0x00283420 File Offset: 0x00281620
|
||||
[Token(Token = "0x600B93E")]
|
||||
[Address(RVA = "0x25BBC00", Offset = "0x25BAC00", VA = "0x1825BBC00", 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: 0x0600B93F RID: 47423 RVA: 0x00283540 File Offset: 0x00281740
|
||||
[Token(Token = "0x600B93F")]
|
||||
[Address(RVA = "0x25BC270", Offset = "0x25BB270", VA = "0x1825BC270", 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: 0x040074C8 RID: 29896
|
||||
[Token(Token = "0x40074C8")]
|
||||
private const int blockSize = 8;
|
||||
|
||||
// Token: 0x040074C9 RID: 29897
|
||||
[Token(Token = "0x40074C9")]
|
||||
private const int macSize = 4;
|
||||
|
||||
// Token: 0x040074CA RID: 29898
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074CA")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040074CB RID: 29899
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074CB")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040074CC RID: 29900
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074CC")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040074CD RID: 29901
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074CD")]
|
||||
private bool firstStep = true;
|
||||
|
||||
// Token: 0x040074CE RID: 29902
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074CE")]
|
||||
private int[] workingKey;
|
||||
|
||||
// Token: 0x040074CF RID: 29903
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40074CF")]
|
||||
private byte[] macIV;
|
||||
|
||||
// Token: 0x040074D0 RID: 29904
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40074D0")]
|
||||
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: 0x02001D31 RID: 7473
|
||||
[Token(Token = "0x2001D31")]
|
||||
public class HMac : IMac
|
||||
{
|
||||
// Token: 0x0600B940 RID: 47424 RVA: 0x0028357C File Offset: 0x0028177C
|
||||
[Token(Token = "0x600B940")]
|
||||
[Address(RVA = "0x25BD270", Offset = "0x25BC270", VA = "0x1825BD270")]
|
||||
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: 0x17001D2F RID: 7471
|
||||
// (get) Token: 0x0600B941 RID: 47425 RVA: 0x002835C0 File Offset: 0x002817C0
|
||||
[Token(Token = "0x17001D2F")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B941")]
|
||||
[Address(RVA = "0x25BD320", Offset = "0x25BC320", VA = "0x1825BD320", Slot = "11")]
|
||||
get
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
return 0 + "/HMAC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B942 RID: 47426 RVA: 0x002835E8 File Offset: 0x002817E8
|
||||
[Token(Token = "0x600B942")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530", Slot = "12")]
|
||||
public virtual IDigest GetUnderlyingDigest()
|
||||
{
|
||||
return this.digest;
|
||||
}
|
||||
|
||||
// Token: 0x0600B943 RID: 47427 RVA: 0x002835FC File Offset: 0x002817FC
|
||||
[Token(Token = "0x600B943")]
|
||||
[Address(RVA = "0x25BCD30", Offset = "0x25BBD30", VA = "0x1825BCD30", 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: 0x0600B944 RID: 47428 RVA: 0x00283750 File Offset: 0x00281950
|
||||
[Token(Token = "0x600B944")]
|
||||
[Address(RVA = "0x411540", Offset = "0x410540", VA = "0x180411540", Slot = "14")]
|
||||
public virtual int GetMacSize()
|
||||
{
|
||||
return this.digestSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B945 RID: 47429 RVA: 0x00283764 File Offset: 0x00281964
|
||||
[Token(Token = "0x600B945")]
|
||||
[Address(RVA = "0x25BD1C0", Offset = "0x25BC1C0", VA = "0x1825BD1C0", Slot = "15")]
|
||||
public virtual void Update(byte input)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B946 RID: 47430 RVA: 0x00283780 File Offset: 0x00281980
|
||||
[Token(Token = "0x600B946")]
|
||||
[Address(RVA = "0x25BCA60", Offset = "0x25BBA60", VA = "0x1825BCA60", Slot = "16")]
|
||||
public virtual void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
}
|
||||
|
||||
// Token: 0x0600B947 RID: 47431 RVA: 0x0028379C File Offset: 0x0028199C
|
||||
[Token(Token = "0x600B947")]
|
||||
[Address(RVA = "0x25BCAE0", Offset = "0x25BBAE0", VA = "0x1825BCAE0", 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: 0x0600B948 RID: 47432 RVA: 0x00283854 File Offset: 0x00281A54
|
||||
[Token(Token = "0x600B948")]
|
||||
[Address(RVA = "0x25BD140", Offset = "0x25BC140", VA = "0x1825BD140", Slot = "18")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
byte[] array = this.inputPad;
|
||||
IDigest digest2 = this.digest;
|
||||
int length = array.Length;
|
||||
}
|
||||
|
||||
// Token: 0x0600B949 RID: 47433 RVA: 0x00283884 File Offset: 0x00281A84
|
||||
[Token(Token = "0x600B949")]
|
||||
[Address(RVA = "0x25BD220", Offset = "0x25BC220", VA = "0x1825BD220")]
|
||||
private static void XorPad(byte[] pad, int len, byte n)
|
||||
{
|
||||
int num = 0;
|
||||
if (len > 0)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x040074D1 RID: 29905
|
||||
[Token(Token = "0x40074D1")]
|
||||
private const byte IPAD = 54;
|
||||
|
||||
// Token: 0x040074D2 RID: 29906
|
||||
[Token(Token = "0x40074D2")]
|
||||
private const byte OPAD = 92;
|
||||
|
||||
// Token: 0x040074D3 RID: 29907
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074D3")]
|
||||
private readonly IDigest digest;
|
||||
|
||||
// Token: 0x040074D4 RID: 29908
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074D4")]
|
||||
private readonly int digestSize;
|
||||
|
||||
// Token: 0x040074D5 RID: 29909
|
||||
[FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x40074D5")]
|
||||
private readonly int blockLength;
|
||||
|
||||
// Token: 0x040074D6 RID: 29910
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074D6")]
|
||||
private IMemoable ipadState;
|
||||
|
||||
// Token: 0x040074D7 RID: 29911
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074D7")]
|
||||
private IMemoable opadState;
|
||||
|
||||
// Token: 0x040074D8 RID: 29912
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074D8")]
|
||||
private readonly byte[] inputPad;
|
||||
|
||||
// Token: 0x040074D9 RID: 29913
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40074D9")]
|
||||
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: 0x02001D32 RID: 7474
|
||||
[Token(Token = "0x2001D32")]
|
||||
public class ISO9797Alg3Mac : IMac
|
||||
{
|
||||
// Token: 0x0600B94A RID: 47434 RVA: 0x002838A4 File Offset: 0x00281AA4
|
||||
[Token(Token = "0x600B94A")]
|
||||
[Address(RVA = "0x25BE020", Offset = "0x25BD020", VA = "0x1825BE020")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B94B RID: 47435 RVA: 0x002838B8 File Offset: 0x00281AB8
|
||||
[Token(Token = "0x600B94B")]
|
||||
[Address(RVA = "0x25BE0A0", Offset = "0x25BD0A0", VA = "0x1825BE0A0")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, IBlockCipherPadding padding)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B94C RID: 47436 RVA: 0x002838CC File Offset: 0x00281ACC
|
||||
[Token(Token = "0x600B94C")]
|
||||
[Address(RVA = "0x25BDE50", Offset = "0x25BCE50", VA = "0x1825BDE50")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, int macSizeInBits)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B94D RID: 47437 RVA: 0x002838DC File Offset: 0x00281ADC
|
||||
[Token(Token = "0x600B94D")]
|
||||
[Address(RVA = "0x25BDE70", Offset = "0x25BCE70", VA = "0x1825BDE70")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, int macSizeInBits, IBlockCipherPadding padding)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B94D)
|
||||
|
||||
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: 0x17001D30 RID: 7472
|
||||
// (get) Token: 0x0600B94E RID: 47438 RVA: 0x0028395C File Offset: 0x00281B5C
|
||||
[Token(Token = "0x17001D30")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B94E")]
|
||||
[Address(RVA = "0x25BE130", Offset = "0x25BD130", VA = "0x1825BE130", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "ISO9797Alg3";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B94F RID: 47439 RVA: 0x00283970 File Offset: 0x00281B70
|
||||
[Token(Token = "0x600B94F")]
|
||||
[Address(RVA = "0x25BD830", Offset = "0x25BC830", VA = "0x1825BD830", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B94F)
|
||||
|
||||
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: 0x0600B950 RID: 47440 RVA: 0x00283A98 File Offset: 0x00281C98
|
||||
[Token(Token = "0x600B950")]
|
||||
[Address(RVA = "0x42B830", Offset = "0x42A830", VA = "0x18042B830", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B951 RID: 47441 RVA: 0x00283AAC File Offset: 0x00281CAC
|
||||
[Token(Token = "0x600B951")]
|
||||
[Address(RVA = "0x25BDDA0", Offset = "0x25BCDA0", VA = "0x1825BDDA0", 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: 0x0600B952 RID: 47442 RVA: 0x00283AF8 File Offset: 0x00281CF8
|
||||
[Token(Token = "0x600B952")]
|
||||
[Address(RVA = "0x25BD380", Offset = "0x25BC380", VA = "0x1825BD380", 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: 0x0600B953 RID: 47443 RVA: 0x00283B78 File Offset: 0x00281D78
|
||||
[Token(Token = "0x600B953")]
|
||||
[Address(RVA = "0x25BD5A0", Offset = "0x25BC5A0", VA = "0x1825BD5A0", 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: 0x0600B954 RID: 47444 RVA: 0x00283C78 File Offset: 0x00281E78
|
||||
[Token(Token = "0x600B954")]
|
||||
[Address(RVA = "0x25BDD30", Offset = "0x25BCD30", VA = "0x1825BDD30", 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: 0x040074DA RID: 29914
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074DA")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x040074DB RID: 29915
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074DB")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x040074DC RID: 29916
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074DC")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x040074DD RID: 29917
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074DD")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040074DE RID: 29918
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074DE")]
|
||||
private IBlockCipherPadding padding;
|
||||
|
||||
// Token: 0x040074DF RID: 29919
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40074DF")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x040074E0 RID: 29920
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40074E0")]
|
||||
private KeyParameter lastKey2;
|
||||
|
||||
// Token: 0x040074E1 RID: 29921
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40074E1")]
|
||||
private KeyParameter lastKey3;
|
||||
}
|
||||
}
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001D2B RID: 7467
|
||||
[Token(Token = "0x2001D2B")]
|
||||
internal class MacCFBBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B902 RID: 47362 RVA: 0x0028212C File Offset: 0x0028032C
|
||||
[Token(Token = "0x600B902")]
|
||||
[Address(RVA = "0x25BE6D0", Offset = "0x25BD6D0", VA = "0x1825BE6D0")]
|
||||
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: 0x0600B903 RID: 47363 RVA: 0x00282180 File Offset: 0x00280380
|
||||
[Token(Token = "0x600B903")]
|
||||
[Address(RVA = "0x25BE2A0", Offset = "0x25BD2A0", VA = "0x1825BE2A0", 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: 0x17001D28 RID: 7464
|
||||
// (get) Token: 0x0600B904 RID: 47364 RVA: 0x002821F8 File Offset: 0x002803F8
|
||||
[Token(Token = "0x17001D28")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B904")]
|
||||
[Address(RVA = "0x25BE7B0", Offset = "0x25BD7B0", VA = "0x1825BE7B0", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D29 RID: 7465
|
||||
// (get) Token: 0x0600B905 RID: 47365 RVA: 0x0028221C File Offset: 0x0028041C
|
||||
[Token(Token = "0x17001D29")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B905")]
|
||||
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B906 RID: 47366 RVA: 0x0028222C File Offset: 0x0028042C
|
||||
[Token(Token = "0x600B906")]
|
||||
[Address(RVA = "0x471180", Offset = "0x470180", VA = "0x180471180", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B907 RID: 47367 RVA: 0x00282240 File Offset: 0x00280440
|
||||
[Token(Token = "0x600B907")]
|
||||
[Address(RVA = "0x25BE440", Offset = "0x25BD440", VA = "0x1825BE440", 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: 0x0600B908 RID: 47368 RVA: 0x002822D8 File Offset: 0x002804D8
|
||||
[Token(Token = "0x600B908")]
|
||||
[Address(RVA = "0x25BE660", Offset = "0x25BD660", VA = "0x1825BE660", Slot = "9")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] iv = this.IV;
|
||||
byte[] array = this.cfbV;
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B909 RID: 47369 RVA: 0x00282304 File Offset: 0x00280504
|
||||
[Token(Token = "0x600B909")]
|
||||
[Address(RVA = "0x25BE230", Offset = "0x25BD230", VA = "0x1825BE230")]
|
||||
public void GetMacBlock(byte[] mac)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x040074AE RID: 29870
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074AE")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x040074AF RID: 29871
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074AF")]
|
||||
private byte[] cfbV;
|
||||
|
||||
// Token: 0x040074B0 RID: 29872
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074B0")]
|
||||
private byte[] cfbOutV;
|
||||
|
||||
// Token: 0x040074B1 RID: 29873
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074B1")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x040074B2 RID: 29874
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074B2")]
|
||||
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: 0x02001D33 RID: 7475
|
||||
[Token(Token = "0x2001D33")]
|
||||
public class Poly1305 : IMac
|
||||
{
|
||||
// Token: 0x0600B955 RID: 47445 RVA: 0x00283CB4 File Offset: 0x00281EB4
|
||||
[Token(Token = "0x600B955")]
|
||||
[Address(RVA = "0x25C4EA0", Offset = "0x25C3EA0", VA = "0x1825C4EA0")]
|
||||
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: 0x0600B956 RID: 47446 RVA: 0x00283CF0 File Offset: 0x00281EF0
|
||||
[Token(Token = "0x600B956")]
|
||||
[Address(RVA = "0x25C4F10", Offset = "0x25C3F10", VA = "0x1825C4F10")]
|
||||
public Poly1305(IBlockCipher cipher)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B956)
|
||||
|
||||
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: 0x0600B957 RID: 47447 RVA: 0x00283D40 File Offset: 0x00281F40
|
||||
[Token(Token = "0x600B957")]
|
||||
[Address(RVA = "0x25C45A0", Offset = "0x25C35A0", VA = "0x1825C45A0", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B957)
|
||||
|
||||
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: 0x0600B958 RID: 47448 RVA: 0x00283DAC File Offset: 0x00281FAC
|
||||
[Token(Token = "0x600B958")]
|
||||
[Address(RVA = "0x25C4AF0", Offset = "0x25C3AF0", VA = "0x1825C4AF0")]
|
||||
private void SetKey(byte[] key, byte[] nonce)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B958)
|
||||
|
||||
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: 0x17001D31 RID: 7473
|
||||
// (get) Token: 0x0600B959 RID: 47449 RVA: 0x00283E78 File Offset: 0x00282078
|
||||
[Token(Token = "0x17001D31")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B959")]
|
||||
[Address(RVA = "0x25C4FE0", Offset = "0x25C3FE0", VA = "0x1825C4FE0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
if (this.cipher == 0)
|
||||
{
|
||||
return "Poly1305";
|
||||
}
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B95A RID: 47450 RVA: 0x00283E98 File Offset: 0x00282098
|
||||
[Token(Token = "0x600B95A")]
|
||||
[Address(RVA = "0x8BB9C0", Offset = "0x8BA9C0", VA = "0x1808BB9C0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x0600B95B RID: 47451 RVA: 0x00283EA8 File Offset: 0x002820A8
|
||||
[Token(Token = "0x600B95B")]
|
||||
[Address(RVA = "0x25C4D90", Offset = "0x25C3D90", VA = "0x1825C4D90", 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: 0x0600B95C RID: 47452 RVA: 0x00283F20 File Offset: 0x00282120
|
||||
[Token(Token = "0x600B95C")]
|
||||
[Address(RVA = "0x25C4230", Offset = "0x25C3230", VA = "0x1825C4230", 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: 0x0600B95D RID: 47453 RVA: 0x00283F74 File Offset: 0x00282174
|
||||
[Token(Token = "0x600B95D")]
|
||||
[Address(RVA = "0x25C47C0", Offset = "0x25C37C0", VA = "0x1825C47C0")]
|
||||
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: 0x0600B95E RID: 47454 RVA: 0x002841F0 File Offset: 0x002823F0
|
||||
[Token(Token = "0x600B95E")]
|
||||
[Address(RVA = "0x25C4320", Offset = "0x25C3320", VA = "0x1825C4320", 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: 0x0600B95F RID: 47455 RVA: 0x0028424C File Offset: 0x0028244C
|
||||
[Token(Token = "0x600B95F")]
|
||||
[Address(RVA = "0x25C4AE0", Offset = "0x25C3AE0", VA = "0x1825C4AE0", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
int num = 0;
|
||||
this.currentBlockOffset = num;
|
||||
this.h3 = (uint)num;
|
||||
this.h1 = (uint)num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B960 RID: 47456 RVA: 0x00284270 File Offset: 0x00282470
|
||||
[Token(Token = "0x600B960")]
|
||||
[Address(RVA = "0x25C5040", Offset = "0x25C4040", VA = "0x1825C5040")]
|
||||
private static ulong mul32x32_64(uint i1, uint i2)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B960)
|
||||
|
||||
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: 0x040074E2 RID: 29922
|
||||
[Token(Token = "0x40074E2")]
|
||||
private const int BlockSize = 16;
|
||||
|
||||
// Token: 0x040074E3 RID: 29923
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074E3")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x040074E4 RID: 29924
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074E4")]
|
||||
private readonly byte[] singleByte;
|
||||
|
||||
// Token: 0x040074E5 RID: 29925
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074E5")]
|
||||
private uint r0;
|
||||
|
||||
// Token: 0x040074E6 RID: 29926
|
||||
[FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x40074E6")]
|
||||
private uint r1;
|
||||
|
||||
// Token: 0x040074E7 RID: 29927
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074E7")]
|
||||
private uint r2;
|
||||
|
||||
// Token: 0x040074E8 RID: 29928
|
||||
[FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x40074E8")]
|
||||
private uint r3;
|
||||
|
||||
// Token: 0x040074E9 RID: 29929
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074E9")]
|
||||
private uint r4;
|
||||
|
||||
// Token: 0x040074EA RID: 29930
|
||||
[FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x40074EA")]
|
||||
private uint s1;
|
||||
|
||||
// Token: 0x040074EB RID: 29931
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40074EB")]
|
||||
private uint s2;
|
||||
|
||||
// Token: 0x040074EC RID: 29932
|
||||
[FieldOffset(Offset = "0x3C")]
|
||||
[Token(Token = "0x40074EC")]
|
||||
private uint s3;
|
||||
|
||||
// Token: 0x040074ED RID: 29933
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x40074ED")]
|
||||
private uint s4;
|
||||
|
||||
// Token: 0x040074EE RID: 29934
|
||||
[FieldOffset(Offset = "0x44")]
|
||||
[Token(Token = "0x40074EE")]
|
||||
private uint k0;
|
||||
|
||||
// Token: 0x040074EF RID: 29935
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x40074EF")]
|
||||
private uint k1;
|
||||
|
||||
// Token: 0x040074F0 RID: 29936
|
||||
[FieldOffset(Offset = "0x4C")]
|
||||
[Token(Token = "0x40074F0")]
|
||||
private uint k2;
|
||||
|
||||
// Token: 0x040074F1 RID: 29937
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x40074F1")]
|
||||
private uint k3;
|
||||
|
||||
// Token: 0x040074F2 RID: 29938
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x40074F2")]
|
||||
private byte[] currentBlock;
|
||||
|
||||
// Token: 0x040074F3 RID: 29939
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x40074F3")]
|
||||
private int currentBlockOffset;
|
||||
|
||||
// Token: 0x040074F4 RID: 29940
|
||||
[FieldOffset(Offset = "0x64")]
|
||||
[Token(Token = "0x40074F4")]
|
||||
private uint h0;
|
||||
|
||||
// Token: 0x040074F5 RID: 29941
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x40074F5")]
|
||||
private uint h1;
|
||||
|
||||
// Token: 0x040074F6 RID: 29942
|
||||
[FieldOffset(Offset = "0x6C")]
|
||||
[Token(Token = "0x40074F6")]
|
||||
private uint h2;
|
||||
|
||||
// Token: 0x040074F7 RID: 29943
|
||||
[FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x40074F7")]
|
||||
private uint h3;
|
||||
|
||||
// Token: 0x040074F8 RID: 29944
|
||||
[FieldOffset(Offset = "0x74")]
|
||||
[Token(Token = "0x40074F8")]
|
||||
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: 0x02001D34 RID: 7476
|
||||
[Token(Token = "0x2001D34")]
|
||||
public class SipHash : IMac
|
||||
{
|
||||
// Token: 0x0600B961 RID: 47457 RVA: 0x00284280 File Offset: 0x00282480
|
||||
[Token(Token = "0x600B961")]
|
||||
[Address(RVA = "0x73F040", Offset = "0x73E040", VA = "0x18073F040")]
|
||||
public SipHash()
|
||||
{
|
||||
this.c = (int)((ulong)2L);
|
||||
this.d = (int)((ulong)4L);
|
||||
}
|
||||
|
||||
// Token: 0x0600B962 RID: 47458 RVA: 0x002842A8 File Offset: 0x002824A8
|
||||
[Token(Token = "0x600B962")]
|
||||
[Address(RVA = "0x73F000", Offset = "0x73E000", VA = "0x18073F000")]
|
||||
public SipHash(int c, int d)
|
||||
{
|
||||
this.c = c;
|
||||
this.d = d;
|
||||
}
|
||||
|
||||
// Token: 0x17001D32 RID: 7474
|
||||
// (get) Token: 0x0600B963 RID: 47459 RVA: 0x002842CC File Offset: 0x002824CC
|
||||
[Token(Token = "0x17001D32")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B963")]
|
||||
[Address(RVA = "0x25C7710", Offset = "0x25C6710", VA = "0x1825C7710", 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: 0x0600B964 RID: 47460 RVA: 0x0028433C File Offset: 0x0028253C
|
||||
[Token(Token = "0x600B964")]
|
||||
[Address(RVA = "0x681E00", Offset = "0x680E00", VA = "0x180681E00", Slot = "12")]
|
||||
public virtual int GetMacSize()
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
// Token: 0x0600B965 RID: 47461 RVA: 0x0028434C File Offset: 0x0028254C
|
||||
[Token(Token = "0x600B965")]
|
||||
[Address(RVA = "0x25C74B0", Offset = "0x25C64B0", VA = "0x1825C74B0", Slot = "13")]
|
||||
public virtual void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B965)
|
||||
|
||||
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: 0x0600B966 RID: 47462 RVA: 0x002843BC File Offset: 0x002825BC
|
||||
[Token(Token = "0x600B966")]
|
||||
[Address(RVA = "0x25C76C0", Offset = "0x25C66C0", VA = "0x1825C76C0", 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: 0x0600B967 RID: 47463 RVA: 0x002843F8 File Offset: 0x002825F8
|
||||
[Token(Token = "0x600B967")]
|
||||
[Address(RVA = "0x25C71B0", Offset = "0x25C61B0", VA = "0x1825C71B0", 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: 0x0600B968 RID: 47464 RVA: 0x002844AC File Offset: 0x002826AC
|
||||
[Token(Token = "0x600B968")]
|
||||
[Address(RVA = "0x25C73E0", Offset = "0x25C63E0", VA = "0x1825C73E0", 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: 0x0600B969 RID: 47465 RVA: 0x002844E4 File Offset: 0x002826E4
|
||||
[Token(Token = "0x600B969")]
|
||||
[Address(RVA = "0x25C7390", Offset = "0x25C6390", VA = "0x1825C7390", Slot = "17")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
// Token: 0x0600B96A RID: 47466 RVA: 0x002844F4 File Offset: 0x002826F4
|
||||
[Token(Token = "0x600B96A")]
|
||||
[Address(RVA = "0x25C7640", Offset = "0x25C6640", VA = "0x1825C7640", 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: 0x0600B96B RID: 47467 RVA: 0x00284540 File Offset: 0x00282740
|
||||
[Token(Token = "0x600B96B")]
|
||||
[Address(RVA = "0x25C7600", Offset = "0x25C6600", VA = "0x1825C7600", Slot = "19")]
|
||||
protected virtual void ProcessMessageWord()
|
||||
{
|
||||
this.ProcessMessageWord();
|
||||
long num = this.m;
|
||||
}
|
||||
|
||||
// Token: 0x0600B96C RID: 47468 RVA: 0x0028455C File Offset: 0x0028275C
|
||||
[Token(Token = "0x600B96C")]
|
||||
[Address(RVA = "0x25C70E0", Offset = "0x25C60E0", VA = "0x1825C70E0", 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: 0x0600B96D RID: 47469 RVA: 0x002845C0 File Offset: 0x002827C0
|
||||
[Token(Token = "0x600B96D")]
|
||||
[Address(RVA = "0x25C76A0", Offset = "0x25C66A0", VA = "0x1825C76A0")]
|
||||
protected static long RotateLeft(long x, int n)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Token: 0x040074F9 RID: 29945
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40074F9")]
|
||||
protected readonly int c;
|
||||
|
||||
// Token: 0x040074FA RID: 29946
|
||||
[FieldOffset(Offset = "0x14")]
|
||||
[Token(Token = "0x40074FA")]
|
||||
protected readonly int d;
|
||||
|
||||
// Token: 0x040074FB RID: 29947
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40074FB")]
|
||||
protected long k0;
|
||||
|
||||
// Token: 0x040074FC RID: 29948
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40074FC")]
|
||||
protected long k1;
|
||||
|
||||
// Token: 0x040074FD RID: 29949
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40074FD")]
|
||||
protected long v0;
|
||||
|
||||
// Token: 0x040074FE RID: 29950
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40074FE")]
|
||||
protected long v1;
|
||||
|
||||
// Token: 0x040074FF RID: 29951
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x40074FF")]
|
||||
protected long v2;
|
||||
|
||||
// Token: 0x04007500 RID: 29952
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007500")]
|
||||
protected long v3;
|
||||
|
||||
// Token: 0x04007501 RID: 29953
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4007501")]
|
||||
protected long m;
|
||||
|
||||
// Token: 0x04007502 RID: 29954
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4007502")]
|
||||
protected int wordPos;
|
||||
|
||||
// Token: 0x04007503 RID: 29955
|
||||
[FieldOffset(Offset = "0x54")]
|
||||
[Token(Token = "0x4007503")]
|
||||
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: 0x02001D35 RID: 7477
|
||||
[Token(Token = "0x2001D35")]
|
||||
public class SkeinMac : IMac
|
||||
{
|
||||
// Token: 0x0600B96E RID: 47470 RVA: 0x002845D0 File Offset: 0x002827D0
|
||||
[Token(Token = "0x600B96E")]
|
||||
[Address(RVA = "0x25C7CD0", Offset = "0x25C6CD0", VA = "0x1825C7CD0")]
|
||||
public SkeinMac(int stateSizeBits, int digestSizeBits)
|
||||
{
|
||||
SkeinEngine skeinEngine = new SkeinEngine(stateSizeBits, digestSizeBits);
|
||||
this.engine = skeinEngine;
|
||||
}
|
||||
|
||||
// Token: 0x0600B96F RID: 47471 RVA: 0x002845F4 File Offset: 0x002827F4
|
||||
[Token(Token = "0x600B96F")]
|
||||
[Address(RVA = "0x25C7C50", Offset = "0x25C6C50", VA = "0x1825C7C50")]
|
||||
public SkeinMac(SkeinMac mac)
|
||||
{
|
||||
SkeinEngine skeinEngine = new SkeinEngine(mac.engine);
|
||||
this.engine = skeinEngine;
|
||||
}
|
||||
|
||||
// Token: 0x17001D33 RID: 7475
|
||||
// (get) Token: 0x0600B970 RID: 47472 RVA: 0x00284620 File Offset: 0x00282820
|
||||
[Token(Token = "0x17001D33")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B970")]
|
||||
[Address(RVA = "0x25C7D50", Offset = "0x25C6D50", VA = "0x1825C7D50", 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: 0x0600B971 RID: 47473 RVA: 0x00284698 File Offset: 0x00282898
|
||||
[Token(Token = "0x600B971")]
|
||||
[Address(RVA = "0x25C7950", Offset = "0x25C6950", VA = "0x1825C7950", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B971)
|
||||
|
||||
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: 0x0600B972 RID: 47474 RVA: 0x00284714 File Offset: 0x00282914
|
||||
[Token(Token = "0x600B972")]
|
||||
[Address(RVA = "0x73E8F0", Offset = "0x73D8F0", VA = "0x18073E8F0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.engine.outputSizeBytes;
|
||||
}
|
||||
|
||||
// Token: 0x0600B973 RID: 47475 RVA: 0x00284734 File Offset: 0x00282934
|
||||
[Token(Token = "0x600B973")]
|
||||
[Address(RVA = "0x25C7C10", Offset = "0x25C6C10", VA = "0x1825C7C10", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
this.engine.Reset();
|
||||
}
|
||||
|
||||
// Token: 0x0600B974 RID: 47476 RVA: 0x00284754 File Offset: 0x00282954
|
||||
[Token(Token = "0x600B974")]
|
||||
[Address(RVA = "0x25C7C30", Offset = "0x25C6C30", VA = "0x1825C7C30", Slot = "7")]
|
||||
public void Update(byte inByte)
|
||||
{
|
||||
this.engine.Update(inByte);
|
||||
}
|
||||
|
||||
// Token: 0x0600B975 RID: 47477 RVA: 0x00284774 File Offset: 0x00282974
|
||||
[Token(Token = "0x600B975")]
|
||||
[Address(RVA = "0x25C7900", Offset = "0x25C6900", VA = "0x1825C7900", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
this.engine.Update(input, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B976 RID: 47478 RVA: 0x00284798 File Offset: 0x00282998
|
||||
[Token(Token = "0x600B976")]
|
||||
[Address(RVA = "0x25C7930", Offset = "0x25C6930", VA = "0x1825C7930", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
return this.engine.DoFinal(output, outOff);
|
||||
}
|
||||
|
||||
// Token: 0x04007504 RID: 29956
|
||||
[Token(Token = "0x4007504")]
|
||||
public const int SKEIN_256 = 256;
|
||||
|
||||
// Token: 0x04007505 RID: 29957
|
||||
[Token(Token = "0x4007505")]
|
||||
public const int SKEIN_512 = 512;
|
||||
|
||||
// Token: 0x04007506 RID: 29958
|
||||
[Token(Token = "0x4007506")]
|
||||
public const int SKEIN_1024 = 1024;
|
||||
|
||||
// Token: 0x04007507 RID: 29959
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007507")]
|
||||
private readonly SkeinEngine engine;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,337 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001D36 RID: 7478
|
||||
[Token(Token = "0x2001D36")]
|
||||
public class VmpcMac : IMac
|
||||
{
|
||||
// Token: 0x0600B977 RID: 47479 RVA: 0x002847B8 File Offset: 0x002829B8
|
||||
[Token(Token = "0x600B977")]
|
||||
[Address(RVA = "0x25C9EB0", Offset = "0x25C8EB0", VA = "0x1825C9EB0", 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: 0x17001D34 RID: 7476
|
||||
// (get) Token: 0x0600B978 RID: 47480 RVA: 0x002849DC File Offset: 0x00282BDC
|
||||
[Token(Token = "0x17001D34")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B978")]
|
||||
[Address(RVA = "0x25CAC10", Offset = "0x25C9C10", VA = "0x1825CAC10", Slot = "12")]
|
||||
get
|
||||
{
|
||||
return "VMPC-MAC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B979 RID: 47481 RVA: 0x002849F0 File Offset: 0x00282BF0
|
||||
[Token(Token = "0x600B979")]
|
||||
[Address(RVA = "0xC42C40", Offset = "0xC41C40", VA = "0x180C42C40", Slot = "13")]
|
||||
public virtual int GetMacSize()
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
// Token: 0x0600B97A RID: 47482 RVA: 0x00284A00 File Offset: 0x00282C00
|
||||
[Token(Token = "0x600B97A")]
|
||||
[Address(RVA = "0x25CA570", Offset = "0x25C9570", VA = "0x1825CA570", Slot = "14")]
|
||||
public virtual void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B97A)
|
||||
|
||||
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: 0x0600B97B RID: 47483 RVA: 0x00284A70 File Offset: 0x00282C70
|
||||
[Token(Token = "0x600B97B")]
|
||||
[Address(RVA = "0x25CAC40", Offset = "0x25C9C40", VA = "0x1825CAC40")]
|
||||
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: 0x0600B97C RID: 47484 RVA: 0x00284B68 File Offset: 0x00282D68
|
||||
[Token(Token = "0x600B97C")]
|
||||
[Address(RVA = "0x25CA7D0", Offset = "0x25C97D0", VA = "0x1825CA7D0", 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: 0x0600B97D RID: 47485 RVA: 0x00284BC0 File Offset: 0x00282DC0
|
||||
[Token(Token = "0x600B97D")]
|
||||
[Address(RVA = "0x25CA870", Offset = "0x25C9870", VA = "0x1825CA870", 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: 0x0600B97E RID: 47486 RVA: 0x00284CF8 File Offset: 0x00282EF8
|
||||
[Token(Token = "0x600B97E")]
|
||||
[Address(RVA = "0x25C9DC0", Offset = "0x25C8DC0", VA = "0x1825C9DC0", Slot = "17")]
|
||||
public virtual void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
if (len > 0)
|
||||
{
|
||||
this.Reset();
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B97F RID: 47487 RVA: 0x00284D18 File Offset: 0x00282F18
|
||||
[Token(Token = "0x600B97F")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public VmpcMac()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04007508 RID: 29960
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007508")]
|
||||
private byte g;
|
||||
|
||||
// Token: 0x04007509 RID: 29961
|
||||
[FieldOffset(Offset = "0x11")]
|
||||
[Token(Token = "0x4007509")]
|
||||
private byte n;
|
||||
|
||||
// Token: 0x0400750A RID: 29962
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400750A")]
|
||||
private byte[] P;
|
||||
|
||||
// Token: 0x0400750B RID: 29963
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400750B")]
|
||||
private byte s;
|
||||
|
||||
// Token: 0x0400750C RID: 29964
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400750C")]
|
||||
private byte[] T;
|
||||
|
||||
// Token: 0x0400750D RID: 29965
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400750D")]
|
||||
private byte[] workingIV;
|
||||
|
||||
// Token: 0x0400750E RID: 29966
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400750E")]
|
||||
private byte[] workingKey;
|
||||
|
||||
// Token: 0x0400750F RID: 29967
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400750F")]
|
||||
private byte x1;
|
||||
|
||||
// Token: 0x04007510 RID: 29968
|
||||
[FieldOffset(Offset = "0x41")]
|
||||
[Token(Token = "0x4007510")]
|
||||
private byte x2;
|
||||
|
||||
// Token: 0x04007511 RID: 29969
|
||||
[FieldOffset(Offset = "0x42")]
|
||||
[Token(Token = "0x4007511")]
|
||||
private byte x3;
|
||||
|
||||
// Token: 0x04007512 RID: 29970
|
||||
[FieldOffset(Offset = "0x43")]
|
||||
[Token(Token = "0x4007512")]
|
||||
private byte x4;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user