a
This commit is contained in:
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs
|
||||
{
|
||||
// Token: 0x02001C4E RID: 7246
|
||||
[Token(Token = "0x2001C4E")]
|
||||
public class Dstu7624Mac : IMac
|
||||
{
|
||||
// Token: 0x0600B551 RID: 46417 RVA: 0x0027990C File Offset: 0x00277B0C
|
||||
[Token(Token = "0x600B551")]
|
||||
[Address(RVA = "0x1C20E10", Offset = "0x1C1FC10", VA = "0x181C20E10")]
|
||||
public Dstu7624Mac(int blockSizeBits, int q)
|
||||
{
|
||||
Dstu7624Engine dstu7624Engine = new Dstu7624Engine(blockSizeBits);
|
||||
this.engine = dstu7624Engine;
|
||||
this.blockSize = dstu7624Engine;
|
||||
this.macSize = blockSizeBits;
|
||||
byte[] array = new byte[dstu7624Engine];
|
||||
int num = this.blockSize;
|
||||
this.c = array;
|
||||
byte[] array2 = new byte[num];
|
||||
int num2 = this.blockSize;
|
||||
this.cTemp = array2;
|
||||
byte[] array3 = new byte[num2];
|
||||
int num3 = this.blockSize;
|
||||
this.kDelta = array3;
|
||||
byte[] array4 = new byte[num3];
|
||||
this.buf = array4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B552 RID: 46418 RVA: 0x00279990 File Offset: 0x00277B90
|
||||
[Token(Token = "0x600B552")]
|
||||
[Address(RVA = "0x1C20A10", Offset = "0x1C1F810", VA = "0x181C20A10", Slot = "4")]
|
||||
public void Init(ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B552)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7624Mac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_25:
|
||||
stloc:ArgumentException(var_6_36, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("invalid parameter passed to Dstu7624Mac init - "), ldloc:string(var_5))))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x17001C8F RID: 7311
|
||||
// (get) Token: 0x0600B553 RID: 46419 RVA: 0x002799D4 File Offset: 0x00277BD4
|
||||
[Token(Token = "0x17001C8F")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B553")]
|
||||
[Address(RVA = "0x1C20EF0", Offset = "0x1C1FCF0", VA = "0x181C20EF0", Slot = "5")]
|
||||
get
|
||||
{
|
||||
return "Dstu7624Mac";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B554 RID: 46420 RVA: 0x002799E8 File Offset: 0x00277BE8
|
||||
[Token(Token = "0x600B554")]
|
||||
[Address(RVA = "0x3FA560", Offset = "0x3F9360", VA = "0x1803FA560", Slot = "6")]
|
||||
public int GetMacSize()
|
||||
{
|
||||
return this.macSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B555 RID: 46421 RVA: 0x002799FC File Offset: 0x00277BFC
|
||||
[Token(Token = "0x600B555")]
|
||||
[Address(RVA = "0x1C20C80", Offset = "0x1C1FA80", VA = "0x181C20C80", Slot = "7")]
|
||||
public void Update(byte input)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num = this.bufOff;
|
||||
if (num == array.Length)
|
||||
{
|
||||
byte[] array2 = this.cTemp;
|
||||
int num2 = 0;
|
||||
byte[] array3 = this.c;
|
||||
int num3 = 0;
|
||||
this.Xor(array3, num3, array, num2, array2);
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
}
|
||||
int num4 = num + 1;
|
||||
this.bufOff = num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B556 RID: 46422 RVA: 0x00279A60 File Offset: 0x00277C60
|
||||
[Token(Token = "0x600B556")]
|
||||
[Address(RVA = "0x1C206F0", Offset = "0x1C1F4F0", VA = "0x181C206F0", Slot = "8")]
|
||||
public void BlockUpdate(byte[] input, int inOff, int len)
|
||||
{
|
||||
string text = this.engine.AlgorithmName;
|
||||
int num = this.bufOff;
|
||||
int num2 = 0;
|
||||
text -= num;
|
||||
if (len > text)
|
||||
{
|
||||
byte[] array = this.buf;
|
||||
int num3 = 0;
|
||||
this.processBlock(array, num3);
|
||||
this.bufOff = num2;
|
||||
if (len > text)
|
||||
{
|
||||
byte[] array2 = this.cTemp;
|
||||
byte[] array3 = this.c;
|
||||
int num4 = 0;
|
||||
this.Xor(array3, num4, input, inOff, array2);
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
}
|
||||
}
|
||||
byte[] array4 = this.buf;
|
||||
Array.Copy(input, inOff, array4, num, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B557 RID: 46423 RVA: 0x00279AF0 File Offset: 0x00277CF0
|
||||
[Token(Token = "0x600B557")]
|
||||
[Address(RVA = "0x1C20F20", Offset = "0x1C1FD20", VA = "0x181C20F20")]
|
||||
private void processBlock(byte[] input, int inOff)
|
||||
{
|
||||
byte[] array = this.cTemp;
|
||||
byte[] array2 = this.c;
|
||||
int num = 0;
|
||||
this.Xor(array2, num, input, inOff, array);
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
}
|
||||
|
||||
// Token: 0x0600B558 RID: 46424 RVA: 0x00279B28 File Offset: 0x00277D28
|
||||
[Token(Token = "0x600B558")]
|
||||
[Address(RVA = "0x1C20D40", Offset = "0x1C1FB40", VA = "0x181C20D40")]
|
||||
private void Xor(byte[] c, int cOff, byte[] input, int inOff, byte[] xorResult)
|
||||
{
|
||||
if (this.blockSize > 0)
|
||||
{
|
||||
byte b;
|
||||
input[0] = b;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B559 RID: 46425 RVA: 0x00279B4C File Offset: 0x00277D4C
|
||||
[Token(Token = "0x600B559")]
|
||||
[Address(RVA = "0x1C20890", Offset = "0x1C1F690", VA = "0x181C20890", Slot = "9")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B559)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.Dstu7624Mac::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_89:
|
||||
stloc:DataLengthException(var_13_93, newobj:DataLengthException(DataLengthException::.ctor, ldstr:string("Input must be a multiple of blocksize")))
|
||||
}
|
||||
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
|
||||
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
||||
--- End of inner exception stack trace ---
|
||||
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
||||
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B55A RID: 46426 RVA: 0x00279BF0 File Offset: 0x00277DF0
|
||||
[Token(Token = "0x600B55A")]
|
||||
[Address(RVA = "0x1C20BA0", Offset = "0x1C1F9A0", VA = "0x181C20BA0", Slot = "10")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] array = this.c;
|
||||
int num = 0;
|
||||
Arrays.Fill(array, (byte)num);
|
||||
byte[] array2 = this.cTemp;
|
||||
int num2 = 0;
|
||||
Arrays.Fill(array2, (byte)num2);
|
||||
byte[] array3 = this.kDelta;
|
||||
int num3 = 0;
|
||||
Arrays.Fill(array3, (byte)num3);
|
||||
byte[] array4 = this.buf;
|
||||
int num4 = 0;
|
||||
Arrays.Fill(array4, (byte)num4);
|
||||
bool isPartialBlockOkay = this.engine.IsPartialBlockOkay;
|
||||
Dstu7624Engine dstu7624Engine = this.engine;
|
||||
int num5 = 0;
|
||||
this.bufOff = num5;
|
||||
}
|
||||
|
||||
// Token: 0x04007305 RID: 29445
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007305")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x04007306 RID: 29446
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007306")]
|
||||
private Dstu7624Engine engine;
|
||||
|
||||
// Token: 0x04007307 RID: 29447
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007307")]
|
||||
private int blockSize;
|
||||
|
||||
// Token: 0x04007308 RID: 29448
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007308")]
|
||||
private byte[] c;
|
||||
|
||||
// Token: 0x04007309 RID: 29449
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007309")]
|
||||
private byte[] cTemp;
|
||||
|
||||
// Token: 0x0400730A RID: 29450
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400730A")]
|
||||
private byte[] kDelta;
|
||||
|
||||
// Token: 0x0400730B RID: 29451
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400730B")]
|
||||
private byte[] buf;
|
||||
|
||||
// Token: 0x0400730C RID: 29452
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400730C")]
|
||||
private int bufOff;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user