oh dear
This commit is contained in:
+245
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C52 RID: 7250
|
||||
[Token(Token = "0x2001C52")]
|
||||
public class ISO9797Alg3Mac : IMac
|
||||
{
|
||||
// Token: 0x0600B57C RID: 46460 RVA: 0x0027A750 File Offset: 0x00278950
|
||||
[Token(Token = "0x600B57C")]
|
||||
[Address(RVA = "0x1C29450", Offset = "0x1C28250", VA = "0x181C29450")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B57D RID: 46461 RVA: 0x0027A764 File Offset: 0x00278964
|
||||
[Token(Token = "0x600B57D")]
|
||||
[Address(RVA = "0x1C294D0", Offset = "0x1C282D0", VA = "0x181C294D0")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, IBlockCipherPadding padding)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B57E RID: 46462 RVA: 0x0027A778 File Offset: 0x00278978
|
||||
[Token(Token = "0x600B57E")]
|
||||
[Address(RVA = "0x1C29280", Offset = "0x1C28080", VA = "0x181C29280")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, int macSizeInBits)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B57F RID: 46463 RVA: 0x0027A788 File Offset: 0x00278988
|
||||
[Token(Token = "0x600B57F")]
|
||||
[Address(RVA = "0x1C292A0", Offset = "0x1C280A0", VA = "0x181C292A0")]
|
||||
public ISO9797Alg3Mac(IBlockCipher cipher, int macSizeInBits, IBlockCipherPadding padding)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B57F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.ISO9797Alg3Mac::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings.IBlockCipherPadding)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_66:
|
||||
stloc:ArgumentException(var_6_70, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("cipher must be instance of DesEngine")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x17001C93 RID: 7315
|
||||
// (get) Token: 0x0600B580 RID: 46464 RVA: 0x0027A808 File Offset: 0x00278A08
|
||||
[Token(Token = "0x17001C93")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B580")]
|
||||
[Address(RVA = "0x1C29560", Offset = "0x1C28360", VA = "0x181C29560", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "ISO9797Alg3";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B581 RID: 46465 RVA: 0x0027A81C File Offset: 0x00278A1C
|
||||
[Token(Token = "0x600B581")]
|
||||
[Address(RVA = "0x1C28C60", Offset = "0x1C27A60", VA = "0x181C28C60", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B581)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.ISO9797Alg3Mac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_110:
|
||||
stloc:ArgumentException(var_27_11A, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Key must be either 112 or 168 bit long")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B582 RID: 46466 RVA: 0x0027A944 File Offset: 0x00278B44
|
||||
[Token(Token = "0x600B582")]
|
||||
[Address(RVA = "0x40FFE0", Offset = "0x40EDE0", VA = "0x18040FFE0", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B583 RID: 46467 RVA: 0x0027A958 File Offset: 0x00278B58
|
||||
[Token(Token = "0x600B583")]
|
||||
[Address(RVA = "0x1C291D0", Offset = "0x1C27FD0", VA = "0x181C291D0", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
if (num == array.Length)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
}
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B584 RID: 46468 RVA: 0x0027A9A4 File Offset: 0x00278BA4
|
||||
[Token(Token = "0x600B584")]
|
||||
[Address(RVA = "0x1C287B0", Offset = "0x1C275B0", VA = "0x181C287B0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.bufOff;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
int num2 = 0;
|
||||
this.bufOff = num2;
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
if (num2 < blockCipher2)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
array += num2;
|
||||
byte[] array2 = this.buf;
|
||||
Array.Copy(input, inOff, array2, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B585 RID: 46469 RVA: 0x0027AA24 File Offset: 0x00278C24
|
||||
[Token(Token = "0x600B585")]
|
||||
[Address(RVA = "0x1C289D0", Offset = "0x1C277D0", VA = "0x181C289D0", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = 0;
|
||||
IBlockCipherPadding blockCipherPadding = this.padding;
|
||||
int i = this.bufOff;
|
||||
if (blockCipherPadding != 0)
|
||||
{
|
||||
if (i == blockCipher)
|
||||
{
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array = this.mac;
|
||||
this.bufOff = num;
|
||||
}
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte[] array2 = this.mac;
|
||||
DesEngine desEngine = new DesEngine();
|
||||
int[] workingKey = desEngine.GetWorkingKey();
|
||||
int blockSize = desEngine.GetBlockSize();
|
||||
int[] workingKey2 = desEngine.GetWorkingKey();
|
||||
int blockSize2 = desEngine.GetBlockSize();
|
||||
int num2 = this.macSize;
|
||||
byte[] array3 = this.mac;
|
||||
int num3 = 0;
|
||||
Array.Copy(array3, num3, output, outOff, num2);
|
||||
byte[] array4 = this.buf;
|
||||
int length = array4.Length;
|
||||
int num4 = 0;
|
||||
Array.Clear(array4, num4, length);
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
this.bufOff = num;
|
||||
return this.macSize;
|
||||
}
|
||||
while (i >= blockCipher)
|
||||
{
|
||||
}
|
||||
byte[] array5 = this.buf;
|
||||
int num5 = i + 1;
|
||||
this.bufOff = num5;
|
||||
int num6 = this.bufOff;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B586 RID: 46470 RVA: 0x0027AB24 File Offset: 0x00278D24
|
||||
[Token(Token = "0x600B586")]
|
||||
[Address(RVA = "0x1C29160", Offset = "0x1C27F60", VA = "0x181C29160", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04007321 RID: 29473
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007321")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x04007322 RID: 29474
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007322")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x04007323 RID: 29475
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007323")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x04007324 RID: 29476
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007324")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x04007325 RID: 29477
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007325")]
|
||||
private IBlockCipherPadding padding;
|
||||
|
||||
// Token: 0x04007326 RID: 29478
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007326")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x04007327 RID: 29479
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007327")]
|
||||
private KeyParameter lastKey2;
|
||||
|
||||
// Token: 0x04007328 RID: 29480
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4007328")]
|
||||
private KeyParameter lastKey3;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user