a
This commit is contained in:
+181
@@ -0,0 +1,181 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines
|
||||
{
|
||||
// Token: 0x02001CB8 RID: 7352
|
||||
[Token(Token = "0x2001CB8")]
|
||||
public class VmpcEngine : IStreamCipher
|
||||
{
|
||||
// Token: 0x17001CFD RID: 7421
|
||||
// (get) Token: 0x0600B94F RID: 47439 RVA: 0x00299B80 File Offset: 0x00297D80
|
||||
[Token(Token = "0x17001CFD")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B94F")]
|
||||
[Address(RVA = "0x1A42070", Offset = "0x1A40E70", VA = "0x181A42070", Slot = "9")]
|
||||
get
|
||||
{
|
||||
return "VMPC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B950 RID: 47440 RVA: 0x00299B94 File Offset: 0x00297D94
|
||||
[Token(Token = "0x600B950")]
|
||||
[Address(RVA = "0x1A419D0", Offset = "0x1A407D0", VA = "0x181A419D0", Slot = "10")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B950)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.VmpcEngine::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_4C:
|
||||
stloc:ArgumentException(var_8_56, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("VMPC requires 1 to 768 bytes of IV")))
|
||||
}
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B951 RID: 47441 RVA: 0x00299BF8 File Offset: 0x00297DF8
|
||||
[Token(Token = "0x600B951")]
|
||||
[Address(RVA = "0x1A416A0", Offset = "0x1A404A0", VA = "0x181A416A0", Slot = "11")]
|
||||
protected virtual 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: 0x0600B952 RID: 47442 RVA: 0x00299CF0 File Offset: 0x00297EF0
|
||||
[Token(Token = "0x600B952")]
|
||||
[Address(RVA = "0x1A41C20", Offset = "0x1A40A20", VA = "0x181A41C20", Slot = "12")]
|
||||
public virtual void ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
Check.DataLength(input, inOff, inOff, "input buffer too short");
|
||||
if (len > 0)
|
||||
{
|
||||
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[] p2 = this.P;
|
||||
byte b5 = this.s;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B953 RID: 47443 RVA: 0x00299D68 File Offset: 0x00297F68
|
||||
[Token(Token = "0x600B953")]
|
||||
[Address(RVA = "0x1A41EB0", Offset = "0x1A40CB0", VA = "0x181A41EB0", Slot = "13")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
string algorithmName = ((IStreamCipher)this).AlgorithmName;
|
||||
}
|
||||
|
||||
// Token: 0x0600B954 RID: 47444 RVA: 0x00299D7C File Offset: 0x00297F7C
|
||||
[Token(Token = "0x600B954")]
|
||||
[Address(RVA = "0x1A41ED0", Offset = "0x1A40CD0", VA = "0x181A41ED0", Slot = "14")]
|
||||
public virtual byte ReturnByte(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[] p2 = this.P;
|
||||
byte b5 = this.s;
|
||||
byte b6;
|
||||
return b6;
|
||||
}
|
||||
|
||||
// Token: 0x0600B955 RID: 47445 RVA: 0x00299DE0 File Offset: 0x00297FE0
|
||||
[Token(Token = "0x600B955")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public VmpcEngine()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x040075F5 RID: 30197
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40075F5")]
|
||||
protected byte n;
|
||||
|
||||
// Token: 0x040075F6 RID: 30198
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40075F6")]
|
||||
protected byte[] P;
|
||||
|
||||
// Token: 0x040075F7 RID: 30199
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40075F7")]
|
||||
protected byte s;
|
||||
|
||||
// Token: 0x040075F8 RID: 30200
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x40075F8")]
|
||||
protected byte[] workingIV;
|
||||
|
||||
// Token: 0x040075F9 RID: 30201
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x40075F9")]
|
||||
protected byte[] workingKey;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user