m
This commit is contained in:
+222
@@ -0,0 +1,222 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D12 RID: 7442
|
||||
[Token(Token = "0x2001D12")]
|
||||
public sealed class CbcBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B7EB RID: 47083 RVA: 0x0027C31C File Offset: 0x0027A51C
|
||||
[Token(Token = "0x600B7EB")]
|
||||
[Address(RVA = "0x25B2B40", Offset = "0x25B1B40", VA = "0x1825B2B40")]
|
||||
public CbcBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[0];
|
||||
int num = this.blockSize;
|
||||
this.IV = array;
|
||||
byte[] array2 = new byte[num];
|
||||
int num2 = this.blockSize;
|
||||
this.cbcV = array2;
|
||||
byte[] array3 = new byte[num2];
|
||||
this.cbcNextV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B7EC RID: 47084 RVA: 0x0027C378 File Offset: 0x0027A578
|
||||
[Token(Token = "0x600B7EC")]
|
||||
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B7ED RID: 47085 RVA: 0x0027C38C File Offset: 0x0027A58C
|
||||
[Token(Token = "0x600B7ED")]
|
||||
[Address(RVA = "0x25B25D0", Offset = "0x25B15D0", VA = "0x1825B25D0", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B7ED)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CbcBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_C0:
|
||||
stloc:ArgumentException(var_20_CA, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("initialisation vector must be the same length as block size")))
|
||||
}
|
||||
|
||||
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: 0x17001D12 RID: 7442
|
||||
// (get) Token: 0x0600B7EE RID: 47086 RVA: 0x0027C464 File Offset: 0x0027A664
|
||||
[Token(Token = "0x17001D12")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B7EE")]
|
||||
[Address(RVA = "0x25B2BE0", Offset = "0x25B1BE0", VA = "0x1825B2BE0", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/CBC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D13 RID: 7443
|
||||
// (get) Token: 0x0600B7EF RID: 47087 RVA: 0x0027C48C File Offset: 0x0027A68C
|
||||
[Token(Token = "0x17001D13")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B7EF")]
|
||||
[Address(RVA = "0x424690", Offset = "0x423690", VA = "0x180424690", Slot = "7")]
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B7F0 RID: 47088 RVA: 0x0027C49C File Offset: 0x0027A69C
|
||||
[Token(Token = "0x600B7F0")]
|
||||
[Address(RVA = "0x25B2580", Offset = "0x25B1580", VA = "0x1825B2580", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B7F1 RID: 47089 RVA: 0x0027C4B8 File Offset: 0x0027A6B8
|
||||
[Token(Token = "0x600B7F1")]
|
||||
[Address(RVA = "0x25B2800", Offset = "0x25B1800", VA = "0x1825B2800", Slot = "8")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
if (this.encrypting)
|
||||
{
|
||||
int num = this.blockSize;
|
||||
int num2 = 0;
|
||||
if (num > 0)
|
||||
{
|
||||
byte[] array = this.cbcV;
|
||||
num2 += array;
|
||||
num2++;
|
||||
}
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int length = this.cbcV.Length;
|
||||
return inOff;
|
||||
}
|
||||
int num3 = this.blockSize;
|
||||
byte[] array2 = this.cbcNextV;
|
||||
int num4 = 0;
|
||||
int num5 = 0;
|
||||
Array.Copy(input, inOff, array2, num5, num3);
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
if (this.blockSize > num4)
|
||||
{
|
||||
byte[] array3 = this.cbcV;
|
||||
num4++;
|
||||
}
|
||||
byte[] array4 = this.cbcNextV;
|
||||
byte[] array5 = this.cbcV;
|
||||
this.cbcV = array4;
|
||||
this.cbcNextV = array5;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B7F2 RID: 47090 RVA: 0x0027C568 File Offset: 0x0027A768
|
||||
[Token(Token = "0x600B7F2")]
|
||||
[Address(RVA = "0x25B2AB0", Offset = "0x25B1AB0", VA = "0x1825B2AB0", Slot = "9")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] iv = this.IV;
|
||||
int length = iv.Length;
|
||||
int num = 0;
|
||||
byte[] array = this.cbcV;
|
||||
int num2 = 0;
|
||||
Array.Copy(iv, num2, array, num, length);
|
||||
byte[] array2 = this.cbcNextV;
|
||||
int length2 = array2.Length;
|
||||
int num3 = 0;
|
||||
Array.Clear(array2, num3, length2);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B7F3 RID: 47091 RVA: 0x0027C5C8 File Offset: 0x0027A7C8
|
||||
[Token(Token = "0x600B7F3")]
|
||||
[Address(RVA = "0x25B2410", Offset = "0x25B1410", VA = "0x1825B2410")]
|
||||
private int EncryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num = this.blockSize;
|
||||
int num2 = 0;
|
||||
if (num > 0)
|
||||
{
|
||||
byte[] array = this.cbcV;
|
||||
num2 += array;
|
||||
num2++;
|
||||
}
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int length = this.cbcV.Length;
|
||||
return inOff;
|
||||
}
|
||||
|
||||
// Token: 0x0600B7F4 RID: 47092 RVA: 0x0027C60C File Offset: 0x0027A80C
|
||||
[Token(Token = "0x600B7F4")]
|
||||
[Address(RVA = "0x25B22A0", Offset = "0x25B12A0", VA = "0x1825B22A0")]
|
||||
private int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num = this.blockSize;
|
||||
byte[] array = this.cbcNextV;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(input, inOff, array, num3, num);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
if (this.blockSize > num2)
|
||||
{
|
||||
byte[] array2 = this.cbcV;
|
||||
num2++;
|
||||
}
|
||||
byte[] array3 = this.cbcNextV;
|
||||
byte[] array4 = this.cbcV;
|
||||
this.cbcV = array3;
|
||||
this.cbcNextV = array4;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04007407 RID: 29703
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007407")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x04007408 RID: 29704
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007408")]
|
||||
private byte[] cbcV;
|
||||
|
||||
// Token: 0x04007409 RID: 29705
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007409")]
|
||||
private byte[] cbcNextV;
|
||||
|
||||
// Token: 0x0400740A RID: 29706
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400740A")]
|
||||
private int blockSize;
|
||||
|
||||
// Token: 0x0400740B RID: 29707
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400740B")]
|
||||
private IBlockCipher cipher;
|
||||
|
||||
// Token: 0x0400740C RID: 29708
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400740C")]
|
||||
private bool encrypting;
|
||||
}
|
||||
}
|
||||
+385
@@ -0,0 +1,385 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D13 RID: 7443
|
||||
[Token(Token = "0x2001D13")]
|
||||
public class CcmBlockCipher : IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x0600B7F5 RID: 47093 RVA: 0x0027C678 File Offset: 0x0027A878
|
||||
[Token(Token = "0x600B7F5")]
|
||||
[Address(RVA = "0x25B4140", Offset = "0x25B3140", VA = "0x1825B4140")]
|
||||
public CcmBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
this.associatedText = memoryStream;
|
||||
MemoryStream memoryStream2 = new MemoryStream();
|
||||
this.data = memoryStream2;
|
||||
base..ctor();
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[CcmBlockCipher.BlockSize];
|
||||
this.macBlock = array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B7F6 RID: 47094 RVA: 0x0027C6D4 File Offset: 0x0027A8D4
|
||||
[Token(Token = "0x600B7F6")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530", Slot = "17")]
|
||||
public virtual IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B7F7 RID: 47095 RVA: 0x0027C6E8 File Offset: 0x0027A8E8
|
||||
[Token(Token = "0x600B7F7")]
|
||||
[Address(RVA = "0x25B33E0", Offset = "0x25B23E0", VA = "0x1825B33E0", Slot = "18")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B7F7)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CcmBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_78:
|
||||
stloc:ArgumentException(var_11_82, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("invalid parameters passed to CCM")))
|
||||
}
|
||||
|
||||
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: 0x17001D14 RID: 7444
|
||||
// (get) Token: 0x0600B7F8 RID: 47096 RVA: 0x0027C778 File Offset: 0x0027A978
|
||||
[Token(Token = "0x17001D14")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B7F8")]
|
||||
[Address(RVA = "0x25B42D0", Offset = "0x25B32D0", VA = "0x1825B42D0", Slot = "19")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/CCM";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B7F9 RID: 47097 RVA: 0x0027C7A0 File Offset: 0x0027A9A0
|
||||
[Token(Token = "0x600B7F9")]
|
||||
[Address(RVA = "0x25B3260", Offset = "0x25B2260", VA = "0x1825B3260", Slot = "20")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B7FA RID: 47098 RVA: 0x0027C7BC File Offset: 0x0027A9BC
|
||||
[Token(Token = "0x600B7FA")]
|
||||
[Address(RVA = "0x25B3670", Offset = "0x25B2670", VA = "0x1825B3670", Slot = "21")]
|
||||
public virtual void ProcessAadByte(byte input)
|
||||
{
|
||||
((IDisposable)this.associatedText).Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x0600B7FB RID: 47099 RVA: 0x0027C7DC File Offset: 0x0027A9DC
|
||||
[Token(Token = "0x600B7FB")]
|
||||
[Address(RVA = "0x25B36A0", Offset = "0x25B26A0", VA = "0x1825B36A0", Slot = "22")]
|
||||
public virtual void ProcessAadBytes(byte[] inBytes, int inOff, int len)
|
||||
{
|
||||
int num = this.associatedText.Read(inBytes, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B7FC RID: 47100 RVA: 0x0027C800 File Offset: 0x0027AA00
|
||||
[Token(Token = "0x600B7FC")]
|
||||
[Address(RVA = "0x25B36D0", Offset = "0x25B26D0", VA = "0x1825B36D0", Slot = "23")]
|
||||
public virtual int ProcessByte(byte input, byte[] outBytes, int outOff)
|
||||
{
|
||||
MemoryStream memoryStream = this.data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600B7FD RID: 47101 RVA: 0x0027C81C File Offset: 0x0027AA1C
|
||||
[Token(Token = "0x600B7FD")]
|
||||
[Address(RVA = "0x25B3700", Offset = "0x25B2700", VA = "0x1825B3700", Slot = "24")]
|
||||
public virtual int ProcessBytes(byte[] inBytes, int inOff, int inLen, byte[] outBytes, int outOff)
|
||||
{
|
||||
Check.DataLength(inBytes, inOff, inOff, "Input buffer too short");
|
||||
int num = this.data.ReadByte();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600B7FE RID: 47102 RVA: 0x0027C84C File Offset: 0x0027AA4C
|
||||
[Token(Token = "0x600B7FE")]
|
||||
[Address(RVA = "0x25B3150", Offset = "0x25B2150", VA = "0x1825B3150", Slot = "25")]
|
||||
public virtual int DoFinal(byte[] outBytes, int outOff)
|
||||
{
|
||||
MemoryStream memoryStream = this.data;
|
||||
long length = this.data.Length;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B7FF RID: 47103 RVA: 0x0027C874 File Offset: 0x0027AA74
|
||||
[Token(Token = "0x600B7FF")]
|
||||
[Address(RVA = "0x25B4080", Offset = "0x25B3080", VA = "0x1825B4080", Slot = "26")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
MemoryStream memoryStream = this.associatedText;
|
||||
((IDisposable)this.data).Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x0600B800 RID: 47104 RVA: 0x0027C8A0 File Offset: 0x0027AAA0
|
||||
[Token(Token = "0x600B800")]
|
||||
[Address(RVA = "0x25B32B0", Offset = "0x25B22B0", VA = "0x1825B32B0", Slot = "27")]
|
||||
public virtual byte[] GetMac()
|
||||
{
|
||||
byte[] array = this.macBlock;
|
||||
int num = this.macSize;
|
||||
int num2 = 0;
|
||||
return Arrays.CopyOfRange(array, num2, num);
|
||||
}
|
||||
|
||||
// Token: 0x0600B801 RID: 47105 RVA: 0x0027C8C8 File Offset: 0x0027AAC8
|
||||
[Token(Token = "0x600B801")]
|
||||
[Address(RVA = "0x4242C0", Offset = "0x4232C0", VA = "0x1804242C0", Slot = "28")]
|
||||
public virtual int GetUpdateOutputSize(int len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600B802 RID: 47106 RVA: 0x0027C8D8 File Offset: 0x0027AAD8
|
||||
[Token(Token = "0x600B802")]
|
||||
[Address(RVA = "0x25B3320", Offset = "0x25B2320", VA = "0x1825B3320", Slot = "29")]
|
||||
public virtual int GetOutputSize(int len)
|
||||
{
|
||||
bool flag = this.data.CanWrite;
|
||||
int num = this.macSize;
|
||||
flag = (flag ? 1 : 0) + len != 0;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
if ((flag ? 1 : 0) < num)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
flag = (flag ? 1 : 0) - num != 0;
|
||||
}
|
||||
flag = (flag ? 1 : 0) + num != 0;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B803 RID: 47107 RVA: 0x0027C918 File Offset: 0x0027AB18
|
||||
[Token(Token = "0x600B803")]
|
||||
[Address(RVA = "0x25B3F90", Offset = "0x25B2F90", VA = "0x1825B3F90", Slot = "30")]
|
||||
public virtual byte[] ProcessPacket(byte[] input, int inOff, int inLen)
|
||||
{
|
||||
int num = this.macSize;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
}
|
||||
byte[] array = new byte[input];
|
||||
byte[] array2 = this.ProcessPacket(input, inOff, inLen);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B804 RID: 47108 RVA: 0x0027C954 File Offset: 0x0027AB54
|
||||
[Token(Token = "0x600B804")]
|
||||
[Address(RVA = "0x25B37A0", Offset = "0x25B27A0", VA = "0x1825B37A0", Slot = "31")]
|
||||
public virtual int ProcessPacket(byte[] input, int inOff, int inLen, byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B804)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CcmBlockCipher::ProcessPacket(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_11D:
|
||||
stloc:InvalidCipherTextException(var_24_127, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in CCM failed")))
|
||||
}
|
||||
|
||||
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: 0x0600B805 RID: 47109 RVA: 0x0027CA8C File Offset: 0x0027AC8C
|
||||
[Token(Token = "0x600B805")]
|
||||
[Address(RVA = "0x25B2C40", Offset = "0x25B1C40", VA = "0x1825B2C40")]
|
||||
private int CalculateMac(byte[] data, int dataOff, int dataLen, byte[] macBlock)
|
||||
{
|
||||
int num;
|
||||
CbcBlockCipherMac cbcBlockCipherMac = new CbcBlockCipherMac(this.cipher, dataOff, num);
|
||||
num = 0;
|
||||
byte[] array = new byte[16];
|
||||
bool flag = this.associatedText.CanWrite;
|
||||
byte[] array2 = this.initialAssociatedText;
|
||||
if (array2 == 0)
|
||||
{
|
||||
}
|
||||
int length = array2.Length;
|
||||
flag = (flag ? 1 : 0) + length != 0;
|
||||
if (flag > false)
|
||||
{
|
||||
}
|
||||
uint num2;
|
||||
flag = (flag ? 1U : 0U) - num2 != 0U;
|
||||
flag = flag - typeof(IMac).TypeHandle != null;
|
||||
array[0] = (flag ? 1 : 0);
|
||||
byte[] array3 = this.nonce;
|
||||
uint num3;
|
||||
array[0] = (byte)num3;
|
||||
byte[] array4 = this.nonce;
|
||||
int length2 = array4.Length;
|
||||
int num4 = 0;
|
||||
uint num5;
|
||||
Array.Copy(array4, num4, array, (int)num5, length2);
|
||||
if (dataLen > 0)
|
||||
{
|
||||
int num6 = array.Length;
|
||||
num6 -= (int)num5;
|
||||
num5 += (uint)1;
|
||||
}
|
||||
int length3 = array.Length;
|
||||
bool flag2 = this.associatedText.CanWrite;
|
||||
byte[] array5 = this.initialAssociatedText;
|
||||
int num7 = 0;
|
||||
if (array5 == 0)
|
||||
{
|
||||
}
|
||||
flag2 = (flag2 ? 1 : 0) + num7 != 0;
|
||||
if (flag2 > false)
|
||||
{
|
||||
bool canWrite = this.associatedText.CanWrite;
|
||||
if (this.initialAssociatedText == 0)
|
||||
{
|
||||
}
|
||||
byte[] array6 = this.initialAssociatedText;
|
||||
if (array6 != 0)
|
||||
{
|
||||
int length4 = array6.Length;
|
||||
}
|
||||
long length5 = this.associatedText.Length;
|
||||
MemoryStream memoryStream = this.associatedText;
|
||||
MemoryStream memoryStream2 = this.associatedText;
|
||||
long length6 = memoryStream2.Length;
|
||||
int num8 = 0;
|
||||
if (memoryStream2 < 0)
|
||||
{
|
||||
}
|
||||
uint num9;
|
||||
if (length6 < (long)num9)
|
||||
{
|
||||
num9 = (uint)((long)num9 - length6);
|
||||
if (num8 < cbcBlockCipherMac)
|
||||
{
|
||||
num8 += num8;
|
||||
num8++;
|
||||
}
|
||||
while (num8 != cbcBlockCipherMac)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
int num10 = 0;
|
||||
num10 += 3;
|
||||
num10 += 19;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B806 RID: 47110 RVA: 0x0027CC1C File Offset: 0x0027AE1C
|
||||
[Token(Token = "0x600B806")]
|
||||
[Address(RVA = "0x25B3210", Offset = "0x25B2210", VA = "0x1825B3210")]
|
||||
private int GetAssociatedTextLength()
|
||||
{
|
||||
bool flag = this.associatedText.CanWrite;
|
||||
byte[] array = this.initialAssociatedText;
|
||||
if (array == 0)
|
||||
{
|
||||
flag = flag + array != null;
|
||||
}
|
||||
int length = array.Length;
|
||||
flag = (flag ? 1 : 0) + length != 0;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B807 RID: 47111 RVA: 0x0027CC54 File Offset: 0x0027AE54
|
||||
[Token(Token = "0x600B807")]
|
||||
[Address(RVA = "0x25B3390", Offset = "0x25B2390", VA = "0x1825B3390")]
|
||||
private bool HasAssociatedText()
|
||||
{
|
||||
bool flag = this.associatedText.CanWrite;
|
||||
byte[] array = this.initialAssociatedText;
|
||||
if (array == 0)
|
||||
{
|
||||
flag = flag + array != null;
|
||||
return flag > false;
|
||||
}
|
||||
int length = array.Length;
|
||||
flag = (flag ? 1 : 0) + length != 0;
|
||||
return flag > false;
|
||||
}
|
||||
|
||||
// Token: 0x0400740D RID: 29709
|
||||
[Token(Token = "0x400740D")]
|
||||
private static readonly int BlockSize;
|
||||
|
||||
// Token: 0x0400740E RID: 29710
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400740E")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x0400740F RID: 29711
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400740F")]
|
||||
private readonly byte[] macBlock;
|
||||
|
||||
// Token: 0x04007410 RID: 29712
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007410")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x04007411 RID: 29713
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007411")]
|
||||
private byte[] nonce;
|
||||
|
||||
// Token: 0x04007412 RID: 29714
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007412")]
|
||||
private byte[] initialAssociatedText;
|
||||
|
||||
// Token: 0x04007413 RID: 29715
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007413")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x04007414 RID: 29716
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007414")]
|
||||
private ICipherParameters keyParam;
|
||||
|
||||
// Token: 0x04007415 RID: 29717
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4007415")]
|
||||
private readonly MemoryStream associatedText;
|
||||
|
||||
// Token: 0x04007416 RID: 29718
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4007416")]
|
||||
private readonly MemoryStream data;
|
||||
}
|
||||
}
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D14 RID: 7444
|
||||
[Token(Token = "0x2001D14")]
|
||||
public class CfbBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B809 RID: 47113 RVA: 0x0027CCA8 File Offset: 0x0027AEA8
|
||||
[Token(Token = "0x600B809")]
|
||||
[Address(RVA = "0x25B5220", Offset = "0x25B4220", VA = "0x1825B5220")]
|
||||
public CfbBlockCipher(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: 0x0600B80A RID: 47114 RVA: 0x0027CCFC File Offset: 0x0027AEFC
|
||||
[Token(Token = "0x600B80A")]
|
||||
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B80B RID: 47115 RVA: 0x0027CD10 File Offset: 0x0027AF10
|
||||
[Token(Token = "0x600B80B")]
|
||||
[Address(RVA = "0x25B4FC0", Offset = "0x25B3FC0", VA = "0x1825B4FC0", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
do
|
||||
{
|
||||
this.encrypting = forEncryption;
|
||||
if (parameters == 0 || parameters == 0)
|
||||
{
|
||||
goto IL_5B;
|
||||
}
|
||||
}
|
||||
while (parameters == 0);
|
||||
byte[] iv = this.IV;
|
||||
byte[] array;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
int num2 = iv.Length;
|
||||
num2 -= length;
|
||||
Array.Copy(array, num, iv, num2, length);
|
||||
byte[] iv2 = this.IV;
|
||||
int num3 = 0;
|
||||
Array.Clear(iv2, num3, num2);
|
||||
IL_5B:
|
||||
byte[] iv3 = this.IV;
|
||||
int length2 = iv3.Length;
|
||||
int num4 = 0;
|
||||
byte[] array2 = this.cfbV;
|
||||
int num5 = 0;
|
||||
Array.Copy(iv3, num5, array2, num4, length2);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
if (parameters != 0)
|
||||
{
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D15 RID: 7445
|
||||
// (get) Token: 0x0600B80C RID: 47116 RVA: 0x0027CDC0 File Offset: 0x0027AFC0
|
||||
[Token(Token = "0x17001D15")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B80C")]
|
||||
[Address(RVA = "0x25B5300", Offset = "0x25B4300", VA = "0x1825B5300", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D16 RID: 7446
|
||||
// (get) Token: 0x0600B80D RID: 47117 RVA: 0x0027CDE4 File Offset: 0x0027AFE4
|
||||
[Token(Token = "0x17001D16")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B80D")]
|
||||
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B80E RID: 47118 RVA: 0x0027CDF4 File Offset: 0x0027AFF4
|
||||
[Token(Token = "0x600B80E")]
|
||||
[Address(RVA = "0x4B5010", Offset = "0x4B4010", VA = "0x1804B5010", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B80F RID: 47119 RVA: 0x0027CE08 File Offset: 0x0027B008
|
||||
[Token(Token = "0x600B80F")]
|
||||
[Address(RVA = "0x25B5180", Offset = "0x25B4180", VA = "0x1825B5180", Slot = "8")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
if (this.encrypting)
|
||||
{
|
||||
int num;
|
||||
return num;
|
||||
}
|
||||
int num2;
|
||||
return num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B810 RID: 47120 RVA: 0x0027CE24 File Offset: 0x0027B024
|
||||
[Token(Token = "0x600B810")]
|
||||
[Address(RVA = "0x25B4DA0", Offset = "0x25B3DA0", VA = "0x1825B4DA0")]
|
||||
public int EncryptBlock(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: 0x0600B811 RID: 47121 RVA: 0x0027CEBC File Offset: 0x0027B0BC
|
||||
[Token(Token = "0x600B811")]
|
||||
[Address(RVA = "0x25B4B90", Offset = "0x25B3B90", VA = "0x1825B4B90")]
|
||||
public int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array = this.cfbOutV;
|
||||
byte[] array2 = this.cfbV;
|
||||
int num = array2.Length;
|
||||
int num2 = 0;
|
||||
int num3 = this.blockSize;
|
||||
num -= num3;
|
||||
Array.Copy(array2, num3, array2, num2, num);
|
||||
byte[] array3 = this.cfbV;
|
||||
int num4 = this.blockSize;
|
||||
int num5 = array3.Length;
|
||||
num5 -= num4;
|
||||
Array.Copy(input, inOff, array3, num5, num4);
|
||||
int num6 = this.blockSize;
|
||||
if (num6 > 0)
|
||||
{
|
||||
byte[] array4 = this.cfbOutV;
|
||||
num6 = num4;
|
||||
int num7 = this.blockSize;
|
||||
}
|
||||
return num6;
|
||||
}
|
||||
|
||||
// Token: 0x0600B812 RID: 47122 RVA: 0x0027CF68 File Offset: 0x0027B168
|
||||
[Token(Token = "0x600B812")]
|
||||
[Address(RVA = "0x25B51B0", Offset = "0x25B41B0", VA = "0x1825B51B0", Slot = "9")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] iv = this.IV;
|
||||
int length = iv.Length;
|
||||
int num = 0;
|
||||
byte[] array = this.cfbV;
|
||||
int num2 = 0;
|
||||
Array.Copy(iv, num2, array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04007417 RID: 29719
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007417")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x04007418 RID: 29720
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007418")]
|
||||
private byte[] cfbV;
|
||||
|
||||
// Token: 0x04007419 RID: 29721
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007419")]
|
||||
private byte[] cfbOutV;
|
||||
|
||||
// Token: 0x0400741A RID: 29722
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400741A")]
|
||||
private bool encrypting;
|
||||
|
||||
// Token: 0x0400741B RID: 29723
|
||||
[FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x400741B")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x0400741C RID: 29724
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400741C")]
|
||||
private readonly IBlockCipher cipher;
|
||||
}
|
||||
}
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D15 RID: 7445
|
||||
[Token(Token = "0x2001D15")]
|
||||
public class CtsBlockCipher : BufferedBlockCipher
|
||||
{
|
||||
// Token: 0x0600B813 RID: 47123 RVA: 0x0027CFA8 File Offset: 0x0027B1A8
|
||||
[Token(Token = "0x600B813")]
|
||||
[Address(RVA = "0x25B6760", Offset = "0x25B5760", VA = "0x1825B6760")]
|
||||
public CtsBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B813)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CtsBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_3B:
|
||||
stloc:ArgumentException(var_3_45, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CtsBlockCipher can only accept ECB, or CBC ciphers")))
|
||||
}
|
||||
|
||||
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: 0x0600B814 RID: 47124 RVA: 0x0027CFFC File Offset: 0x0027B1FC
|
||||
[Token(Token = "0x600B814")]
|
||||
[Address(RVA = "0x22E28C0", Offset = "0x22E18C0", VA = "0x1822E28C0", Slot = "26")]
|
||||
public override int GetUpdateOutputSize(int length)
|
||||
{
|
||||
byte[] buf = this.buf;
|
||||
int num = this.bufOff;
|
||||
int length2 = buf.Length;
|
||||
num += length;
|
||||
if (length != 0)
|
||||
{
|
||||
return num - length;
|
||||
}
|
||||
return num - length2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B815 RID: 47125 RVA: 0x0027D038 File Offset: 0x0027B238
|
||||
[Token(Token = "0x600B815")]
|
||||
[Address(RVA = "0x22DB6C0", Offset = "0x22DA6C0", VA = "0x1822DB6C0", Slot = "25")]
|
||||
public override int GetOutputSize(int length)
|
||||
{
|
||||
int bufOff = this.bufOff;
|
||||
return bufOff + length;
|
||||
}
|
||||
|
||||
// Token: 0x0600B816 RID: 47126 RVA: 0x0027D054 File Offset: 0x0027B254
|
||||
[Token(Token = "0x600B816")]
|
||||
[Address(RVA = "0x25B6370", Offset = "0x25B5370", VA = "0x1825B6370", Slot = "28")]
|
||||
public override int ProcessByte(byte input, byte[] output, int outOff)
|
||||
{
|
||||
byte[] buf = this.buf;
|
||||
int num = 0;
|
||||
int bufOff = this.bufOff;
|
||||
if (bufOff == buf.Length)
|
||||
{
|
||||
IBlockCipher cipher = this.cipher;
|
||||
byte[] buf2 = this.buf;
|
||||
int num2 = 0;
|
||||
int num3 = this.blockSize;
|
||||
Array.Copy(buf2, num3, buf2, num2, num3);
|
||||
}
|
||||
int num4 = bufOff + 1;
|
||||
this.bufOff = num4;
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B817 RID: 47127 RVA: 0x0027D0BC File Offset: 0x0027B2BC
|
||||
[Token(Token = "0x600B817")]
|
||||
[Address(RVA = "0x25B6470", Offset = "0x25B5470", VA = "0x1825B6470", Slot = "32")]
|
||||
public override int ProcessBytes(byte[] input, int inOff, int length, byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B817)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CtsBlockCipher::ProcessBytes(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_8C:
|
||||
stloc:uint8[](var_15_95, ldfld:uint8[](BufferedBlockCipher::buf, ldloc:CtsBlockCipher[exp:BufferedBlockCipher](this)))
|
||||
call:void(Array::Copy, ldloc:uint8[][exp:Array](input), ldloc:int32(inOff), ldloc:uint8[][exp:Array](var_15_95), ldloc:int32(var_13), ldloc:int32(length))
|
||||
stloc:ArgumentException(var_16_AD, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Can't have a negative input outLength!")))
|
||||
}
|
||||
|
||||
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: 0x0600B818 RID: 47128 RVA: 0x0027D178 File Offset: 0x0027B378
|
||||
[Token(Token = "0x600B818")]
|
||||
[Address(RVA = "0x25B5EE0", Offset = "0x25B4EE0", VA = "0x1825B5EE0", Slot = "36")]
|
||||
public override int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
num += outOff;
|
||||
IBlockCipher cipher = this.cipher;
|
||||
int bufOff = this.bufOff;
|
||||
byte[] array = new byte[0];
|
||||
byte[] array2 = new byte[0];
|
||||
IBlockCipher cipher2 = this.cipher;
|
||||
if (cipher2 == 0 || cipher2 != 0)
|
||||
{
|
||||
byte[] buf = this.buf;
|
||||
byte[] buf2 = this.buf;
|
||||
IBlockCipher cipher3 = this.cipher;
|
||||
IBlockCipher cipher4 = this.cipher;
|
||||
int num2 = this.bufOff;
|
||||
byte[] buf3 = this.buf;
|
||||
if (num2 != buf3.Length)
|
||||
{
|
||||
num2++;
|
||||
num2++;
|
||||
byte[] buf4 = this.buf;
|
||||
}
|
||||
byte[] buf5 = this.buf;
|
||||
num2 += buf5;
|
||||
num2++;
|
||||
IBlockCipher cipher5 = this.cipher;
|
||||
if (cipher5 == 0 || cipher5 != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int num3;
|
||||
return num3;
|
||||
}
|
||||
|
||||
// Token: 0x0400741D RID: 29725
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400741D")]
|
||||
private readonly int blockSize;
|
||||
}
|
||||
}
|
||||
+476
@@ -0,0 +1,476 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D16 RID: 7446
|
||||
[Token(Token = "0x2001D16")]
|
||||
public class EaxBlockCipher : IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x0600B819 RID: 47129 RVA: 0x0027D24C File Offset: 0x0027B44C
|
||||
[Token(Token = "0x600B819")]
|
||||
[Address(RVA = "0x25B8EE0", Offset = "0x25B7EE0", VA = "0x1825B8EE0")]
|
||||
public EaxBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
int num = this.blockSize;
|
||||
CMac cmac;
|
||||
this.mac = cmac;
|
||||
byte[] array = new byte[num];
|
||||
IMac mac = this.mac;
|
||||
this.macBlock = array;
|
||||
byte[] array2 = new byte[array];
|
||||
IMac mac2 = this.mac;
|
||||
this.associatedTextMac = array2;
|
||||
byte[] array3 = new byte[array2];
|
||||
this.nonceMac = array3;
|
||||
SicBlockCipher sicBlockCipher = new SicBlockCipher(cipher);
|
||||
this.cipher = sicBlockCipher;
|
||||
}
|
||||
|
||||
// Token: 0x17001D17 RID: 7447
|
||||
// (get) Token: 0x0600B81A RID: 47130 RVA: 0x0027D2C4 File Offset: 0x0027B4C4
|
||||
[Token(Token = "0x17001D17")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B81A")]
|
||||
[Address(RVA = "0x25B9040", Offset = "0x25B8040", VA = "0x1825B9040", Slot = "17")]
|
||||
get
|
||||
{
|
||||
this.cipher.Reset();
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B81B RID: 47131 RVA: 0x0027D2E4 File Offset: 0x0027B4E4
|
||||
[Token(Token = "0x600B81B")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530", Slot = "18")]
|
||||
public virtual IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B81B)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::GetUnderlyingCipher()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:SicBlockCipher(var_0_06, ldfld:SicBlockCipher(EaxBlockCipher::cipher, ldloc:EaxBlockCipher(this)))
|
||||
}
|
||||
|
||||
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: 0x0600B81C RID: 47132 RVA: 0x0027D2F8 File Offset: 0x0027B4F8
|
||||
[Token(Token = "0x600B81C")]
|
||||
[Address(RVA = "0x4DAF30", Offset = "0x4D9F30", VA = "0x1804DAF30", Slot = "19")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
string algorithmName = ((IBlockCipher)this.cipher).AlgorithmName;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B81D RID: 47133 RVA: 0x0027D318 File Offset: 0x0027B518
|
||||
[Token(Token = "0x600B81D")]
|
||||
[Address(RVA = "0x25B8510", Offset = "0x25B7510", VA = "0x1825B8510", Slot = "20")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B81D)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_E3:
|
||||
stloc:ArgumentException(var_22_ED, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("invalid parameters passed to EAX")))
|
||||
}
|
||||
|
||||
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: 0x0600B81E RID: 47134 RVA: 0x0027D414 File Offset: 0x0027B614
|
||||
[Token(Token = "0x600B81E")]
|
||||
[Address(RVA = "0x25B8440", Offset = "0x25B7440", VA = "0x1825B8440")]
|
||||
private void InitCipher()
|
||||
{
|
||||
if (!this.cipherInitialized)
|
||||
{
|
||||
IMac mac = this.mac;
|
||||
this.cipherInitialized = true;
|
||||
byte[] array = new byte[this.blockSize];
|
||||
int num = this.blockSize;
|
||||
IMac mac2 = this.mac;
|
||||
int num2 = this.blockSize;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B81F RID: 47135 RVA: 0x0027D464 File Offset: 0x0027B664
|
||||
[Token(Token = "0x600B81F")]
|
||||
[Address(RVA = "0x25B7F30", Offset = "0x25B6F30", VA = "0x1825B7F30")]
|
||||
private void CalculateMac()
|
||||
{
|
||||
byte[] array = new byte[this.blockSize];
|
||||
IMac mac = this.mac;
|
||||
int num = 0;
|
||||
byte[] array2 = this.macBlock;
|
||||
if (num < array2.Length)
|
||||
{
|
||||
byte[] array3 = this.nonceMac;
|
||||
byte[] array4 = this.associatedTextMac;
|
||||
num++;
|
||||
byte[] array5 = this.macBlock;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B820 RID: 47136 RVA: 0x0027D4B8 File Offset: 0x0027B6B8
|
||||
[Token(Token = "0x600B820")]
|
||||
[Address(RVA = "0x25B8CF0", Offset = "0x25B7CF0", VA = "0x1825B8CF0", Slot = "21")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
this.Reset(true);
|
||||
}
|
||||
|
||||
// Token: 0x0600B821 RID: 47137 RVA: 0x0027D4CC File Offset: 0x0027B6CC
|
||||
[Token(Token = "0x600B821")]
|
||||
[Address(RVA = "0x25B8D00", Offset = "0x25B7D00", VA = "0x1825B8D00")]
|
||||
private void Reset(bool clearMac)
|
||||
{
|
||||
SicBlockCipher sicBlockCipher = this.cipher;
|
||||
IMac mac = this.mac;
|
||||
byte[] array = this.bufBlock;
|
||||
this.bufOff = (int)((ulong)0L);
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
if (clearMac)
|
||||
{
|
||||
byte[] array2 = this.macBlock;
|
||||
int length2 = array2.Length;
|
||||
int num2 = 0;
|
||||
Array.Clear(array2, num2, length2);
|
||||
}
|
||||
byte[] array3 = new byte[this.blockSize];
|
||||
int num3 = this.blockSize;
|
||||
IMac mac2 = this.mac;
|
||||
int num4 = this.blockSize;
|
||||
byte[] array4 = this.initialAssociatedText;
|
||||
this.cipherInitialized = false;
|
||||
if (array4 != 0)
|
||||
{
|
||||
this.ProcessAadByte(array4);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B822 RID: 47138 RVA: 0x0027D578 File Offset: 0x0027B778
|
||||
[Token(Token = "0x600B822")]
|
||||
[Address(RVA = "0x25B88B0", Offset = "0x25B78B0", VA = "0x1825B88B0", Slot = "22")]
|
||||
public virtual void ProcessAadByte(byte input)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B822)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::ProcessAadByte(System.Byte)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_10:
|
||||
stloc:InvalidOperationException(var_1_1A, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("AAD data cannot be added after encryption/decryption processing has begun.")))
|
||||
}
|
||||
|
||||
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: 0x0600B823 RID: 47139 RVA: 0x0027D5A0 File Offset: 0x0027B7A0
|
||||
[Token(Token = "0x600B823")]
|
||||
[Address(RVA = "0x25B8940", Offset = "0x25B7940", VA = "0x1825B8940", Slot = "23")]
|
||||
public virtual void ProcessAadBytes(byte[] inBytes, int inOff, int len)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B823)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::ProcessAadBytes(System.Byte[],System.Int32,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_11:
|
||||
stloc:InvalidOperationException(var_1_1B, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("AAD data cannot be added after encryption/decryption processing has begun.")))
|
||||
}
|
||||
|
||||
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: 0x0600B824 RID: 47140 RVA: 0x0027D5C8 File Offset: 0x0027B7C8
|
||||
[Token(Token = "0x600B824")]
|
||||
[Address(RVA = "0x25B8A00", Offset = "0x25B7A00", VA = "0x1825B8A00", Slot = "24")]
|
||||
public virtual int ProcessByte(byte input, byte[] outBytes, int outOff)
|
||||
{
|
||||
this.InitCipher();
|
||||
return this.Process(input, outBytes, outOff);
|
||||
}
|
||||
|
||||
// Token: 0x0600B825 RID: 47141 RVA: 0x0027D5E4 File Offset: 0x0027B7E4
|
||||
[Token(Token = "0x600B825")]
|
||||
[Address(RVA = "0x25B8A60", Offset = "0x25B7A60", VA = "0x1825B8A60", Slot = "25")]
|
||||
public virtual int ProcessBytes(byte[] inBytes, int inOff, int len, byte[] outBytes, int outOff)
|
||||
{
|
||||
this.InitCipher();
|
||||
int num = 0;
|
||||
if (len != 0)
|
||||
{
|
||||
int num2;
|
||||
num += num2;
|
||||
num2 = inOff;
|
||||
num2 -= inOff;
|
||||
while (num2 != len)
|
||||
{
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B826 RID: 47142 RVA: 0x0027D614 File Offset: 0x0027B814
|
||||
[Token(Token = "0x600B826")]
|
||||
[Address(RVA = "0x25B8060", Offset = "0x25B7060", VA = "0x1825B8060", Slot = "26")]
|
||||
public virtual int DoFinal(byte[] outBytes, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B826)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_148:
|
||||
stloc:InvalidCipherTextException(var_22_152, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in EAX failed")))
|
||||
}
|
||||
|
||||
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: 0x0600B827 RID: 47143 RVA: 0x0027D774 File Offset: 0x0027B974
|
||||
[Token(Token = "0x600B827")]
|
||||
[Address(RVA = "0x25B8370", Offset = "0x25B7370", VA = "0x1825B8370", Slot = "27")]
|
||||
public virtual byte[] GetMac()
|
||||
{
|
||||
byte[] array = new byte[this.macSize];
|
||||
int num = this.macSize;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(this.macBlock, num3, array, num2, num);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B828 RID: 47144 RVA: 0x0027D7AC File Offset: 0x0027B9AC
|
||||
[Token(Token = "0x600B828")]
|
||||
[Address(RVA = "0x25B8410", Offset = "0x25B7410", VA = "0x1825B8410", Slot = "28")]
|
||||
public virtual int GetUpdateOutputSize(int len)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
num += len;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
int num2 = this.macSize;
|
||||
num -= num2;
|
||||
}
|
||||
return num - len;
|
||||
}
|
||||
|
||||
// Token: 0x0600B829 RID: 47145 RVA: 0x0027D7E0 File Offset: 0x0027B9E0
|
||||
[Token(Token = "0x600B829")]
|
||||
[Address(RVA = "0x25B83E0", Offset = "0x25B73E0", VA = "0x1825B83E0", Slot = "29")]
|
||||
public virtual int GetOutputSize(int len)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
int num2 = this.macSize;
|
||||
num += len;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
return num2 + num;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return num - num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B82A RID: 47146 RVA: 0x0027D81C File Offset: 0x0027BA1C
|
||||
[Token(Token = "0x600B82A")]
|
||||
[Address(RVA = "0x25B8B20", Offset = "0x25B7B20", VA = "0x1825B8B20")]
|
||||
private int Process(byte b, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
byte[] array = this.bufBlock;
|
||||
int num2 = num + 1;
|
||||
this.bufOff = num2;
|
||||
int length = this.bufBlock.Length;
|
||||
if (this.bufOff != length)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int num3 = 0;
|
||||
int num4 = this.blockSize;
|
||||
Check.OutputLength(outBytes, outOff, num4, "Output buffer is too short");
|
||||
if ((this.forEncryption ? 1 : 0) == num3)
|
||||
{
|
||||
IMac mac = this.mac;
|
||||
int num5 = this.blockSize;
|
||||
int num6 = this.cipher.GetBlockSize();
|
||||
}
|
||||
int num7 = this.cipher.GetBlockSize();
|
||||
IMac mac2 = this.mac;
|
||||
int num8 = this.blockSize;
|
||||
this.bufOff = num3;
|
||||
if ((this.forEncryption ? 1 : 0) == num3)
|
||||
{
|
||||
byte[] array2 = this.bufBlock;
|
||||
int num9 = 0;
|
||||
int num10 = this.macSize;
|
||||
int num11 = this.blockSize;
|
||||
Array.Copy(array2, num11, array2, num9, num10);
|
||||
int num12 = this.macSize;
|
||||
this.bufOff = num12;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B82B RID: 47147 RVA: 0x0027D910 File Offset: 0x0027BB10
|
||||
[Token(Token = "0x600B82B")]
|
||||
[Address(RVA = "0x25B8E50", Offset = "0x25B7E50", VA = "0x1825B8E50")]
|
||||
private bool VerifyMac(byte[] mac, int off)
|
||||
{
|
||||
int num = this.macSize;
|
||||
int num2 = 0;
|
||||
if (num > 0)
|
||||
{
|
||||
byte[] array = this.macBlock;
|
||||
num2++;
|
||||
}
|
||||
return num2 == 0;
|
||||
}
|
||||
|
||||
// Token: 0x0400741E RID: 29726
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400741E")]
|
||||
private SicBlockCipher cipher;
|
||||
|
||||
// Token: 0x0400741F RID: 29727
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400741F")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x04007420 RID: 29728
|
||||
[FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x4007420")]
|
||||
private int blockSize;
|
||||
|
||||
// Token: 0x04007421 RID: 29729
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007421")]
|
||||
private IMac mac;
|
||||
|
||||
// Token: 0x04007422 RID: 29730
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007422")]
|
||||
private byte[] nonceMac;
|
||||
|
||||
// Token: 0x04007423 RID: 29731
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007423")]
|
||||
private byte[] associatedTextMac;
|
||||
|
||||
// Token: 0x04007424 RID: 29732
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007424")]
|
||||
private byte[] macBlock;
|
||||
|
||||
// Token: 0x04007425 RID: 29733
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007425")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x04007426 RID: 29734
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4007426")]
|
||||
private byte[] bufBlock;
|
||||
|
||||
// Token: 0x04007427 RID: 29735
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4007427")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x04007428 RID: 29736
|
||||
[FieldOffset(Offset = "0x54")]
|
||||
[Token(Token = "0x4007428")]
|
||||
private bool cipherInitialized;
|
||||
|
||||
// Token: 0x04007429 RID: 29737
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4007429")]
|
||||
private byte[] initialAssociatedText;
|
||||
|
||||
// Token: 0x02001D17 RID: 7447
|
||||
[Token(Token = "0x2001D17")]
|
||||
private enum Tag : byte
|
||||
{
|
||||
// Token: 0x0400742B RID: 29739
|
||||
[Token(Token = "0x400742B")]
|
||||
N,
|
||||
// Token: 0x0400742C RID: 29740
|
||||
[Token(Token = "0x400742C")]
|
||||
H,
|
||||
// Token: 0x0400742D RID: 29741
|
||||
[Token(Token = "0x400742D")]
|
||||
C
|
||||
}
|
||||
}
|
||||
}
|
||||
+249
@@ -0,0 +1,249 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D19 RID: 7449
|
||||
[Token(Token = "0x2001D19")]
|
||||
public class GOfbBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B845 RID: 47173 RVA: 0x0027E718 File Offset: 0x0027C918
|
||||
[Token(Token = "0x600B845")]
|
||||
[Address(RVA = "0x25B99D0", Offset = "0x25B89D0", VA = "0x1825B99D0")]
|
||||
public GOfbBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[0];
|
||||
this.IV = array;
|
||||
byte[] array2 = new byte[array];
|
||||
this.ofbV = array2;
|
||||
byte[] array3 = new byte[array2];
|
||||
this.ofbOutV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B846 RID: 47174 RVA: 0x0027E774 File Offset: 0x0027C974
|
||||
[Token(Token = "0x600B846")]
|
||||
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B847 RID: 47175 RVA: 0x0027E788 File Offset: 0x0027C988
|
||||
[Token(Token = "0x600B847")]
|
||||
[Address(RVA = "0x25B9460", Offset = "0x25B8460", VA = "0x1825B9460", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
do
|
||||
{
|
||||
int num = 0;
|
||||
this.firstStep = true;
|
||||
this.N3 = num;
|
||||
if (parameters == 0 || parameters == 0)
|
||||
{
|
||||
goto IL_4D;
|
||||
}
|
||||
}
|
||||
while (parameters == 0);
|
||||
byte[] iv = this.IV;
|
||||
byte[] array;
|
||||
int length = array.Length;
|
||||
int length2 = iv.Length;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(array, num2, iv, num3, length2);
|
||||
IL_4D:
|
||||
byte[] iv2 = this.IV;
|
||||
int length3 = iv2.Length;
|
||||
int num4 = 0;
|
||||
byte[] array2 = this.ofbV;
|
||||
int num5 = 0;
|
||||
Array.Copy(iv2, num5, array2, num4, length3);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
if (parameters != 0)
|
||||
{
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D19 RID: 7449
|
||||
// (get) Token: 0x0600B848 RID: 47176 RVA: 0x0027E82C File Offset: 0x0027CA2C
|
||||
[Token(Token = "0x17001D19")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B848")]
|
||||
[Address(RVA = "0x25B9BB0", Offset = "0x25B8BB0", VA = "0x1825B9BB0", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/GCTR";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D1A RID: 7450
|
||||
// (get) Token: 0x0600B849 RID: 47177 RVA: 0x0027E854 File Offset: 0x0027CA54
|
||||
[Token(Token = "0x17001D1A")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B849")]
|
||||
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B84A RID: 47178 RVA: 0x0027E864 File Offset: 0x0027CA64
|
||||
[Token(Token = "0x600B84A")]
|
||||
[Address(RVA = "0x471180", Offset = "0x470180", VA = "0x180471180", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B84B RID: 47179 RVA: 0x0027E878 File Offset: 0x0027CA78
|
||||
[Token(Token = "0x600B84B")]
|
||||
[Address(RVA = "0x25B9690", Offset = "0x25B8690", VA = "0x1825B9690", Slot = "8")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
int num = 0;
|
||||
if ((this.firstStep ? 1 : 0) != num)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
this.firstStep = num != 0;
|
||||
byte[] array = this.ofbOutV;
|
||||
byte[] array2 = this.ofbOutV;
|
||||
int num2 = 0;
|
||||
int num3 = this.bytesToint(array2, num2);
|
||||
byte[] array3 = this.ofbOutV;
|
||||
this.N3 = num3;
|
||||
int num4 = this.bytesToint(array3, 4);
|
||||
this.N4 = num4;
|
||||
}
|
||||
int num5 = this.N3;
|
||||
num5 += 16843009;
|
||||
int num6 = this.N4;
|
||||
this.N3 = num5;
|
||||
if (num6 < 16843012 && num6 > 0)
|
||||
{
|
||||
num6++;
|
||||
this.N4 = num6;
|
||||
}
|
||||
byte[] array4 = this.ofbV;
|
||||
int num7 = 0;
|
||||
this.intTobytes(num5, array4, num7);
|
||||
byte[] array5 = this.ofbV;
|
||||
int n = this.N4;
|
||||
uint num8;
|
||||
this.intTobytes(n, array5, (int)num8);
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
byte[] array6 = this.ofbOutV;
|
||||
int num9;
|
||||
if (this.blockSize > 0)
|
||||
{
|
||||
byte[] array7 = this.ofbOutV;
|
||||
num9 = this.blockSize;
|
||||
}
|
||||
byte[] array8 = this.ofbV;
|
||||
int num10 = array8.Length;
|
||||
int num11 = 0;
|
||||
num10 -= num9;
|
||||
Array.Copy(array8, num9, array8, num11, num10);
|
||||
byte[] array9 = this.ofbV;
|
||||
int num12 = this.blockSize;
|
||||
int num13 = 0;
|
||||
int num14 = array9.Length;
|
||||
byte[] array10 = this.ofbOutV;
|
||||
num14 -= num12;
|
||||
Array.Copy(array10, num13, array9, num14, num12);
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B84C RID: 47180 RVA: 0x0027E9E8 File Offset: 0x0027CBE8
|
||||
[Token(Token = "0x600B84C")]
|
||||
[Address(RVA = "0x25B9960", Offset = "0x25B8960", VA = "0x1825B9960", Slot = "9")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] iv = this.IV;
|
||||
int length = iv.Length;
|
||||
int num = 0;
|
||||
byte[] array = this.ofbV;
|
||||
int num2 = 0;
|
||||
Array.Copy(iv, num2, array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B84D RID: 47181 RVA: 0x0027EA28 File Offset: 0x0027CC28
|
||||
[Token(Token = "0x600B84D")]
|
||||
[Address(RVA = "0x25B9AF0", Offset = "0x25B8AF0", VA = "0x1825B9AF0")]
|
||||
private int bytesToint(byte[] inBytes, int inOff)
|
||||
{
|
||||
int length = inBytes.Length;
|
||||
int num = inOff + 1;
|
||||
byte b;
|
||||
byte b2;
|
||||
b += b2;
|
||||
b += b2;
|
||||
byte b3;
|
||||
b += b3;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B84E RID: 47182 RVA: 0x0027EA54 File Offset: 0x0027CC54
|
||||
[Token(Token = "0x600B84E")]
|
||||
[Address(RVA = "0x22DD6C0", Offset = "0x22DC6C0", VA = "0x1822DD6C0")]
|
||||
private void intTobytes(int num, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num2 = outOff + 1;
|
||||
}
|
||||
|
||||
// Token: 0x04007448 RID: 29768
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007448")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x04007449 RID: 29769
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007449")]
|
||||
private byte[] ofbV;
|
||||
|
||||
// Token: 0x0400744A RID: 29770
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400744A")]
|
||||
private byte[] ofbOutV;
|
||||
|
||||
// Token: 0x0400744B RID: 29771
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400744B")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x0400744C RID: 29772
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400744C")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x0400744D RID: 29773
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400744D")]
|
||||
private bool firstStep = true;
|
||||
|
||||
// Token: 0x0400744E RID: 29774
|
||||
[FieldOffset(Offset = "0x3C")]
|
||||
[Token(Token = "0x400744E")]
|
||||
private int N3;
|
||||
|
||||
// Token: 0x0400744F RID: 29775
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400744F")]
|
||||
private int N4;
|
||||
|
||||
// Token: 0x04007450 RID: 29776
|
||||
[Token(Token = "0x4007450")]
|
||||
private const int C1 = 16843012;
|
||||
|
||||
// Token: 0x04007451 RID: 29777
|
||||
[Token(Token = "0x4007451")]
|
||||
private const int C2 = 16843009;
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001D21 RID: 7457
|
||||
[Token(Token = "0x2001D21")]
|
||||
public class BasicGcmExponentiator : IGcmExponentiator
|
||||
{
|
||||
// Token: 0x0600B8B5 RID: 47285 RVA: 0x00280C14 File Offset: 0x0027EE14
|
||||
[Token(Token = "0x600B8B5")]
|
||||
[Address(RVA = "0x25B0CD0", Offset = "0x25AFCD0", VA = "0x1825B0CD0", Slot = "4")]
|
||||
public void Init(byte[] x)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(x, num, array);
|
||||
this.x = array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8B6 RID: 47286 RVA: 0x00280C3C File Offset: 0x0027EE3C
|
||||
[Token(Token = "0x600B8B6")]
|
||||
[Address(RVA = "0x25B0B30", Offset = "0x25AFB30", VA = "0x1825B0B30", Slot = "5")]
|
||||
public void ExponentiateX(long pow, byte[] output)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
array[0] = (uint)((ulong)2147483648L);
|
||||
uint[] array2 = Arrays.Clone(this.x);
|
||||
GcmUtilities.Multiply(array, array2);
|
||||
GcmUtilities.Multiply(array2, array2);
|
||||
int num = 0;
|
||||
Pack.UInt32_To_BE(array, output, num);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8B7 RID: 47287 RVA: 0x00280C8C File Offset: 0x0027EE8C
|
||||
[Token(Token = "0x600B8B7")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public BasicGcmExponentiator()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04007493 RID: 29843
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007493")]
|
||||
private uint[] x;
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001D22 RID: 7458
|
||||
[Token(Token = "0x2001D22")]
|
||||
public class BasicGcmMultiplier : IGcmMultiplier
|
||||
{
|
||||
// Token: 0x0600B8B8 RID: 47288 RVA: 0x00280CA0 File Offset: 0x0027EEA0
|
||||
[Token(Token = "0x600B8B8")]
|
||||
[Address(RVA = "0x25B0D80", Offset = "0x25AFD80", VA = "0x1825B0D80", Slot = "4")]
|
||||
public void Init(byte[] H)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(H, num, array);
|
||||
this.H = array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8B9 RID: 47289 RVA: 0x00280CC8 File Offset: 0x0027EEC8
|
||||
[Token(Token = "0x600B8B9")]
|
||||
[Address(RVA = "0x25B0E30", Offset = "0x25AFE30", VA = "0x1825B0E30", Slot = "5")]
|
||||
public void MultiplyH(byte[] x)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(x, num, array);
|
||||
uint[] h = this.H;
|
||||
GcmUtilities.Multiply(array, h);
|
||||
int num2 = 0;
|
||||
Pack.UInt32_To_BE(array, x, num2);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8BA RID: 47290 RVA: 0x00280D00 File Offset: 0x0027EF00
|
||||
[Token(Token = "0x600B8BA")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public BasicGcmMultiplier()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04007494 RID: 29844
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007494")]
|
||||
private uint[] H;
|
||||
}
|
||||
}
|
||||
+441
@@ -0,0 +1,441 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001D23 RID: 7459
|
||||
[Token(Token = "0x2001D23")]
|
||||
internal abstract class GcmUtilities
|
||||
{
|
||||
// Token: 0x0600B8BB RID: 47291 RVA: 0x00280D14 File Offset: 0x0027EF14
|
||||
[Token(Token = "0x600B8BB")]
|
||||
[Address(RVA = "0x25B9D80", Offset = "0x25B8D80", VA = "0x1825B9D80")]
|
||||
private static uint[] GenerateLookup()
|
||||
{
|
||||
uint[] array = new uint[256];
|
||||
int num = 0;
|
||||
num++;
|
||||
array[0] = (uint)256;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8BC RID: 47292 RVA: 0x00280D48 File Offset: 0x0027EF48
|
||||
[Token(Token = "0x600B8BC")]
|
||||
[Address(RVA = "0x25BA790", Offset = "0x25B9790", VA = "0x1825BA790")]
|
||||
internal static byte[] OneAsBytes()
|
||||
{
|
||||
byte[] array = new byte[16];
|
||||
array[0] = (byte)((ulong)128L);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8BD RID: 47293 RVA: 0x00280D74 File Offset: 0x0027EF74
|
||||
[Token(Token = "0x600B8BD")]
|
||||
[Address(RVA = "0x25BA7F0", Offset = "0x25B97F0", VA = "0x1825BA7F0")]
|
||||
internal static uint[] OneAsUints()
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
array[0] = (uint)((ulong)2147483648L);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8BE RID: 47294 RVA: 0x00280DA0 File Offset: 0x0027EFA0
|
||||
[Token(Token = "0x600B8BE")]
|
||||
[Address(RVA = "0x25BA850", Offset = "0x25B9850", VA = "0x1825BA850")]
|
||||
internal static ulong[] OneAsUlongs()
|
||||
{
|
||||
ulong[] array = new ulong[2];
|
||||
array[0] = (ulong)long.MinValue;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8BF RID: 47295 RVA: 0x00280DCC File Offset: 0x0027EFCC
|
||||
[Token(Token = "0x600B8BF")]
|
||||
[Address(RVA = "0x25B9C80", Offset = "0x25B8C80", VA = "0x1825B9C80")]
|
||||
internal static byte[] AsBytes(uint[] x)
|
||||
{
|
||||
return Pack.UInt32_To_BE(x);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8C0 RID: 47296 RVA: 0x00280DE0 File Offset: 0x0027EFE0
|
||||
[Token(Token = "0x600B8C0")]
|
||||
[Address(RVA = "0x25B9C90", Offset = "0x25B8C90", VA = "0x1825B9C90")]
|
||||
internal static void AsBytes(uint[] x, byte[] z)
|
||||
{
|
||||
int num = 0;
|
||||
Pack.UInt32_To_BE(x, z, num);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8C1 RID: 47297 RVA: 0x00280DF8 File Offset: 0x0027EFF8
|
||||
[Token(Token = "0x600B8C1")]
|
||||
[Address(RVA = "0x25B9C10", Offset = "0x25B8C10", VA = "0x1825B9C10")]
|
||||
internal static byte[] AsBytes(ulong[] x)
|
||||
{
|
||||
byte[] array = new byte[16];
|
||||
int num = 0;
|
||||
Pack.UInt64_To_BE(x, array, num);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8C2 RID: 47298 RVA: 0x00280E18 File Offset: 0x0027F018
|
||||
[Token(Token = "0x600B8C2")]
|
||||
[Address(RVA = "0x25B9C70", Offset = "0x25B8C70", VA = "0x1825B9C70")]
|
||||
internal static void AsBytes(ulong[] x, byte[] z)
|
||||
{
|
||||
int num = 0;
|
||||
Pack.UInt64_To_BE(x, z, num);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8C3 RID: 47299 RVA: 0x00280E30 File Offset: 0x0027F030
|
||||
[Token(Token = "0x600B8C3")]
|
||||
[Address(RVA = "0x25B9CB0", Offset = "0x25B8CB0", VA = "0x1825B9CB0")]
|
||||
internal static uint[] AsUints(byte[] bs)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(bs, num, array);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8C4 RID: 47300 RVA: 0x00280E50 File Offset: 0x0027F050
|
||||
[Token(Token = "0x600B8C4")]
|
||||
[Address(RVA = "0x25B9CA0", Offset = "0x25B8CA0", VA = "0x1825B9CA0")]
|
||||
internal static void AsUints(byte[] bs, uint[] output)
|
||||
{
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(bs, num, output);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8C5 RID: 47301 RVA: 0x00280E68 File Offset: 0x0027F068
|
||||
[Token(Token = "0x600B8C5")]
|
||||
[Address(RVA = "0x25B9D10", Offset = "0x25B8D10", VA = "0x1825B9D10")]
|
||||
internal static ulong[] AsUlongs(byte[] x)
|
||||
{
|
||||
ulong[] array = new ulong[2];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt64(x, num, array);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8C6 RID: 47302 RVA: 0x00280E88 File Offset: 0x0027F088
|
||||
[Token(Token = "0x600B8C6")]
|
||||
[Address(RVA = "0x25B9D70", Offset = "0x25B8D70", VA = "0x1825B9D70")]
|
||||
public static void AsUlongs(byte[] x, ulong[] z)
|
||||
{
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt64(x, num, z);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8C7 RID: 47303 RVA: 0x00280EA0 File Offset: 0x0027F0A0
|
||||
[Token(Token = "0x600B8C7")]
|
||||
[Address(RVA = "0x25BA540", Offset = "0x25B9540", VA = "0x1825BA540")]
|
||||
internal static void Multiply(byte[] x, byte[] y)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(x, num, array);
|
||||
uint[] array2 = new uint[4];
|
||||
int num2 = 0;
|
||||
Pack.BE_To_UInt32(y, num2, array2);
|
||||
GcmUtilities.Multiply(array, array2);
|
||||
int num3 = 0;
|
||||
Pack.UInt32_To_BE(array, x, num3);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8C8 RID: 47304 RVA: 0x00280EE4 File Offset: 0x0027F0E4
|
||||
[Token(Token = "0x600B8C8")]
|
||||
[Address(RVA = "0x25BA360", Offset = "0x25B9360", VA = "0x1825BA360")]
|
||||
internal static void Multiply(uint[] x, uint[] y)
|
||||
{
|
||||
int length = x.Length;
|
||||
int num = 0;
|
||||
uint num2 = y[num];
|
||||
num2 += num2;
|
||||
while (num != y.Length)
|
||||
{
|
||||
}
|
||||
num++;
|
||||
x[0] = (uint)num;
|
||||
x[0] = (uint)num;
|
||||
x[1] = (uint)num;
|
||||
x[1] = (uint)num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8C9 RID: 47305 RVA: 0x00280F3C File Offset: 0x0027F13C
|
||||
[Token(Token = "0x600B8C9")]
|
||||
[Address(RVA = "0x25BA650", Offset = "0x25B9650", VA = "0x1825BA650")]
|
||||
internal static void Multiply(ulong[] x, ulong[] y)
|
||||
{
|
||||
int length = x.Length;
|
||||
ulong num = x[1];
|
||||
int num2 = 0;
|
||||
ulong num3 = y[num2];
|
||||
num3 += num3;
|
||||
while (num2 != y.Length)
|
||||
{
|
||||
}
|
||||
num2++;
|
||||
x[0] = (ulong)num2;
|
||||
x[1] = (ulong)num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8CA RID: 47306 RVA: 0x00280F8C File Offset: 0x0027F18C
|
||||
[Token(Token = "0x600B8CA")]
|
||||
[Address(RVA = "0x25BA0A0", Offset = "0x25B90A0", VA = "0x1825BA0A0")]
|
||||
internal static void MultiplyP(uint[] x)
|
||||
{
|
||||
uint num = x[0];
|
||||
x[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
x[0] = num;
|
||||
uint num3 = x[1];
|
||||
x[1] = num2;
|
||||
x[1] = num3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8CB RID: 47307 RVA: 0x00280FDC File Offset: 0x0027F1DC
|
||||
[Token(Token = "0x600B8CB")]
|
||||
[Address(RVA = "0x25BA1B0", Offset = "0x25B91B0", VA = "0x1825BA1B0")]
|
||||
internal static void MultiplyP(uint[] x, uint[] z)
|
||||
{
|
||||
uint num = x[0];
|
||||
z[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
z[0] = num;
|
||||
uint num3 = x[1];
|
||||
z[1] = num2;
|
||||
z[1] = num3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8CC RID: 47308 RVA: 0x0028102C File Offset: 0x0027F22C
|
||||
[Token(Token = "0x600B8CC")]
|
||||
[Address(RVA = "0x25B9F50", Offset = "0x25B8F50", VA = "0x1825B9F50")]
|
||||
internal static void MultiplyP8(uint[] x)
|
||||
{
|
||||
uint num = x[0];
|
||||
x[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
x[0] = num;
|
||||
uint num3 = x[1];
|
||||
x[1] = num2;
|
||||
num = x[1];
|
||||
x[1] = num3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8CD RID: 47309 RVA: 0x00281084 File Offset: 0x0027F284
|
||||
[Token(Token = "0x600B8CD")]
|
||||
[Address(RVA = "0x25B9E90", Offset = "0x25B8E90", VA = "0x1825B9E90")]
|
||||
internal static void MultiplyP8(uint[] x, uint[] y)
|
||||
{
|
||||
uint num = GcmUtilities.ShiftRightN(x, 8, y);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8CE RID: 47310 RVA: 0x002810A0 File Offset: 0x0027F2A0
|
||||
[Token(Token = "0x600B8CE")]
|
||||
[Address(RVA = "0x25BAB20", Offset = "0x25B9B20", VA = "0x1825BAB20")]
|
||||
internal static uint ShiftRight(uint[] x)
|
||||
{
|
||||
uint num = x[0];
|
||||
x[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
x[0] = num;
|
||||
uint num3 = x[1];
|
||||
x[1] = num2;
|
||||
uint num4 = x[1];
|
||||
x[1] = num3;
|
||||
return num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8CF RID: 47311 RVA: 0x002810FC File Offset: 0x0027F2FC
|
||||
[Token(Token = "0x600B8CF")]
|
||||
[Address(RVA = "0x25BABE0", Offset = "0x25B9BE0", VA = "0x1825BABE0")]
|
||||
internal static uint ShiftRight(uint[] x, uint[] z)
|
||||
{
|
||||
uint num = x[0];
|
||||
z[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
z[0] = num;
|
||||
uint num3 = x[1];
|
||||
z[1] = num2;
|
||||
uint num4 = x[1];
|
||||
z[1] = num3;
|
||||
return num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8D0 RID: 47312 RVA: 0x00281154 File Offset: 0x0027F354
|
||||
[Token(Token = "0x600B8D0")]
|
||||
[Address(RVA = "0x25BAA30", Offset = "0x25B9A30", VA = "0x1825BAA30")]
|
||||
internal static uint ShiftRightN(uint[] x, int n)
|
||||
{
|
||||
uint num = x[0];
|
||||
x[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
x[0] = num;
|
||||
uint num3 = x[1];
|
||||
x[1] = num2;
|
||||
uint num4 = x[1];
|
||||
x[1] = num3;
|
||||
return num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8D1 RID: 47313 RVA: 0x002811B0 File Offset: 0x0027F3B0
|
||||
[Token(Token = "0x600B8D1")]
|
||||
[Address(RVA = "0x25BA8C0", Offset = "0x25B98C0", VA = "0x1825BA8C0")]
|
||||
internal static uint ShiftRightN(uint[] x, int n, uint[] z)
|
||||
{
|
||||
uint num = x[0];
|
||||
z[0] = num;
|
||||
uint num2 = x[0];
|
||||
num = num2;
|
||||
z[0] = num;
|
||||
uint num3 = x[1];
|
||||
z[1] = num2;
|
||||
uint num4 = x[1];
|
||||
z[1] = num3;
|
||||
return num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8D2 RID: 47314 RVA: 0x0028120C File Offset: 0x0027F40C
|
||||
[Token(Token = "0x600B8D2")]
|
||||
[Address(RVA = "0x25BB370", Offset = "0x25BA370", VA = "0x1825BB370")]
|
||||
internal static void Xor(byte[] x, byte[] y)
|
||||
{
|
||||
int num = 0;
|
||||
num += 3;
|
||||
if (4UL < (ulong)16L)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B8D3 RID: 47315 RVA: 0x0028122C File Offset: 0x0027F42C
|
||||
[Token(Token = "0x600B8D3")]
|
||||
[Address(RVA = "0x25BAD20", Offset = "0x25B9D20", VA = "0x1825BAD20")]
|
||||
internal static void Xor(byte[] x, byte[] y, int yOff)
|
||||
{
|
||||
int num = 0;
|
||||
num++;
|
||||
num++;
|
||||
num += 2;
|
||||
num++;
|
||||
num++;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8D4 RID: 47316 RVA: 0x00281258 File Offset: 0x0027F458
|
||||
[Token(Token = "0x600B8D4")]
|
||||
[Address(RVA = "0x25BB4C0", Offset = "0x25BA4C0", VA = "0x1825BB4C0")]
|
||||
internal static void Xor(byte[] x, int xOff, byte[] y, int yOff, byte[] z, int zOff)
|
||||
{
|
||||
int num = 0;
|
||||
num += 4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8D5 RID: 47317 RVA: 0x00281274 File Offset: 0x0027F474
|
||||
[Token(Token = "0x600B8D5")]
|
||||
[Address(RVA = "0x25BB300", Offset = "0x25BA300", VA = "0x1825BB300")]
|
||||
internal static void Xor(byte[] x, byte[] y, int yOff, int yLen)
|
||||
{
|
||||
int num = yLen - 1;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8D6 RID: 47318 RVA: 0x0028128C File Offset: 0x0027F48C
|
||||
[Token(Token = "0x600B8D6")]
|
||||
[Address(RVA = "0x25BB760", Offset = "0x25BA760", VA = "0x1825BB760")]
|
||||
internal static void Xor(byte[] x, int xOff, byte[] y, int yOff, int len)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B8D7 RID: 47319 RVA: 0x002812A0 File Offset: 0x0027F4A0
|
||||
[Token(Token = "0x600B8D7")]
|
||||
[Address(RVA = "0x25BB130", Offset = "0x25BA130", VA = "0x1825BB130")]
|
||||
internal static void Xor(byte[] x, byte[] y, byte[] z)
|
||||
{
|
||||
int num = 0;
|
||||
byte b = x[num];
|
||||
z[0] = b;
|
||||
num += 3;
|
||||
if (4UL < (ulong)16L)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B8D8 RID: 47320 RVA: 0x002812D0 File Offset: 0x0027F4D0
|
||||
[Token(Token = "0x600B8D8")]
|
||||
[Address(RVA = "0x25BB040", Offset = "0x25BA040", VA = "0x1825BB040")]
|
||||
internal static void Xor(uint[] x, uint[] y)
|
||||
{
|
||||
uint num = y[1];
|
||||
}
|
||||
|
||||
// Token: 0x0600B8D9 RID: 47321 RVA: 0x002812EC File Offset: 0x0027F4EC
|
||||
[Token(Token = "0x600B8D9")]
|
||||
[Address(RVA = "0x25BAEA0", Offset = "0x25B9EA0", VA = "0x1825BAEA0")]
|
||||
internal static void Xor(uint[] x, uint[] y, uint[] z)
|
||||
{
|
||||
uint num = y[0];
|
||||
z[0] = num;
|
||||
uint num2 = y[0];
|
||||
z[0] = num2;
|
||||
uint num3 = y[1];
|
||||
z[1] = num3;
|
||||
uint num4 = y[1];
|
||||
z[1] = num4;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8DA RID: 47322 RVA: 0x00281340 File Offset: 0x0027F540
|
||||
[Token(Token = "0x600B8DA")]
|
||||
[Address(RVA = "0x25BB6D0", Offset = "0x25BA6D0", VA = "0x1825BB6D0")]
|
||||
internal static void Xor(ulong[] x, ulong[] y)
|
||||
{
|
||||
ulong num = y[1];
|
||||
}
|
||||
|
||||
// Token: 0x0600B8DB RID: 47323 RVA: 0x0028135C File Offset: 0x0027F55C
|
||||
[Token(Token = "0x600B8DB")]
|
||||
[Address(RVA = "0x7EF250", Offset = "0x7EE250", VA = "0x1807EF250")]
|
||||
internal static void Xor(ulong[] x, ulong[] y, ulong[] z)
|
||||
{
|
||||
ulong num = y[0];
|
||||
z[0] = num;
|
||||
ulong num2 = y[1];
|
||||
z[1] = num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8DC RID: 47324 RVA: 0x00281390 File Offset: 0x0027F590
|
||||
[Token(Token = "0x600B8DC")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
protected GcmUtilities()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B8DD RID: 47325 RVA: 0x002813A4 File Offset: 0x0027F5A4
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x600B8DD")]
|
||||
[Address(RVA = "0x25BB7F0", Offset = "0x25BA7F0", VA = "0x1825BB7F0")]
|
||||
static GcmUtilities()
|
||||
{
|
||||
uint[] array = new uint[256];
|
||||
int num = 0;
|
||||
num++;
|
||||
array[0] = (uint)256;
|
||||
}
|
||||
|
||||
// Token: 0x04007495 RID: 29845
|
||||
[Token(Token = "0x4007495")]
|
||||
private const uint E1 = 3774873600U;
|
||||
|
||||
// Token: 0x04007496 RID: 29846
|
||||
[Token(Token = "0x4007496")]
|
||||
private const ulong E1L = 16212958658533785600UL;
|
||||
|
||||
// Token: 0x04007497 RID: 29847
|
||||
[Token(Token = "0x4007497")]
|
||||
private static readonly uint[] LOOKUP;
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001D24 RID: 7460
|
||||
[Token(Token = "0x2001D24")]
|
||||
public interface IGcmExponentiator
|
||||
{
|
||||
// Token: 0x0600B8DE RID: 47326
|
||||
[Token(Token = "0x600B8DE")]
|
||||
[Address(Slot = "0")]
|
||||
void Init(byte[] x);
|
||||
|
||||
// Token: 0x0600B8DF RID: 47327
|
||||
[Token(Token = "0x600B8DF")]
|
||||
[Address(Slot = "1")]
|
||||
void ExponentiateX(long pow, byte[] output);
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001D25 RID: 7461
|
||||
[Token(Token = "0x2001D25")]
|
||||
public interface IGcmMultiplier
|
||||
{
|
||||
// Token: 0x0600B8E0 RID: 47328
|
||||
[Token(Token = "0x600B8E0")]
|
||||
[Address(Slot = "0")]
|
||||
void Init(byte[] H);
|
||||
|
||||
// Token: 0x0600B8E1 RID: 47329
|
||||
[Token(Token = "0x600B8E1")]
|
||||
[Address(Slot = "1")]
|
||||
void MultiplyH(byte[] x);
|
||||
}
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001D26 RID: 7462
|
||||
[Token(Token = "0x2001D26")]
|
||||
public class Tables1kGcmExponentiator : IGcmExponentiator
|
||||
{
|
||||
// Token: 0x0600B8E2 RID: 47330 RVA: 0x002813D8 File Offset: 0x0027F5D8
|
||||
[Token(Token = "0x600B8E2")]
|
||||
[Address(RVA = "0x25C82D0", Offset = "0x25C72D0", VA = "0x1825C82D0", Slot = "4")]
|
||||
public void Init(byte[] x)
|
||||
{
|
||||
uint[] array;
|
||||
do
|
||||
{
|
||||
array = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(x, num, array);
|
||||
if (this.lookupPowX2 == 0)
|
||||
{
|
||||
goto IL_2C;
|
||||
}
|
||||
if (array == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (array == 0);
|
||||
if (Arrays.AreEqual(array, array))
|
||||
{
|
||||
return;
|
||||
}
|
||||
IL_2C:
|
||||
IList list = Platform.CreateArrayList(8);
|
||||
this.lookupPowX2 = list;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8E3 RID: 47331 RVA: 0x00281428 File Offset: 0x0027F628
|
||||
[Token(Token = "0x600B8E3")]
|
||||
[Address(RVA = "0x25C8140", Offset = "0x25C7140", VA = "0x1825C8140", Slot = "5")]
|
||||
public void ExponentiateX(long pow, byte[] output)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
array[0] = (uint)((ulong)2147483648L);
|
||||
this.EnsureAvailable(num);
|
||||
IList list = this.lookupPowX2;
|
||||
GcmUtilities.Multiply(array, array);
|
||||
num++;
|
||||
int num2 = 0;
|
||||
Pack.UInt32_To_BE(array, output, num2);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8E4 RID: 47332 RVA: 0x00281478 File Offset: 0x0027F678
|
||||
[Token(Token = "0x600B8E4")]
|
||||
[Address(RVA = "0x25C7F60", Offset = "0x25C6F60", VA = "0x1825C7F60")]
|
||||
private void EnsureAvailable(int bit)
|
||||
{
|
||||
IList list = this.lookupPowX2;
|
||||
IList list2 = this.lookupPowX2;
|
||||
int i = 0;
|
||||
int num = 0;
|
||||
uint[] array;
|
||||
GcmUtilities.Multiply(array, array);
|
||||
IList list3 = this.lookupPowX2;
|
||||
if (i < num)
|
||||
{
|
||||
i += i;
|
||||
i++;
|
||||
}
|
||||
while (i <= bit)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B8E5 RID: 47333 RVA: 0x002814D4 File Offset: 0x0027F6D4
|
||||
[Token(Token = "0x600B8E5")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public Tables1kGcmExponentiator()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04007498 RID: 29848
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007498")]
|
||||
private IList lookupPowX2;
|
||||
}
|
||||
}
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001D27 RID: 7463
|
||||
[Token(Token = "0x2001D27")]
|
||||
public class Tables64kGcmMultiplier : IGcmMultiplier
|
||||
{
|
||||
// Token: 0x0600B8E6 RID: 47334 RVA: 0x002814E8 File Offset: 0x0027F6E8
|
||||
[Token(Token = "0x600B8E6")]
|
||||
[Address(RVA = "0x25C8440", Offset = "0x25C7440", VA = "0x1825C8440", Slot = "4")]
|
||||
public void Init(byte[] H)
|
||||
{
|
||||
uint[][][] m2;
|
||||
for (;;)
|
||||
{
|
||||
if (this.M != (ulong)0L)
|
||||
{
|
||||
if (Arrays.AreEqual(this.H, H))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint[][][] array = new uint[16][][];
|
||||
this.M = array;
|
||||
}
|
||||
byte[] array2 = Arrays.Clone(H);
|
||||
uint[][][] m = this.M;
|
||||
this.H = array2;
|
||||
uint[][] array3 = new uint[256][];
|
||||
if (array3 != 0)
|
||||
{
|
||||
}
|
||||
m[0] = array3;
|
||||
uint[][] array4 = this.M[0];
|
||||
uint[] array5 = new uint[4];
|
||||
if (array5 != 0)
|
||||
{
|
||||
}
|
||||
array4[0] = array5;
|
||||
uint[][] array6 = this.M[0];
|
||||
uint[] array7 = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(H, num, array7);
|
||||
if (array7 != 0)
|
||||
{
|
||||
}
|
||||
array6[128] = array7;
|
||||
m2 = this.M;
|
||||
uint[] array8 = m2[0][m2];
|
||||
if (m2 == 0)
|
||||
{
|
||||
}
|
||||
if (m2 != 0)
|
||||
{
|
||||
goto Block_2;
|
||||
}
|
||||
}
|
||||
return;
|
||||
Block_2:
|
||||
GcmUtilities.MultiplyP(m2);
|
||||
uint[][] array9 = this.M[0];
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B8E7 RID: 47335 RVA: 0x002816C4 File Offset: 0x0027F8C4
|
||||
[Token(Token = "0x600B8E7")]
|
||||
[Address(RVA = "0x25C8C60", Offset = "0x25C7C60", VA = "0x1825C8C60", Slot = "5")]
|
||||
public void MultiplyH(byte[] x)
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
int num = 0;
|
||||
byte b;
|
||||
uint num2 = this.M[num][(int)b][1];
|
||||
num++;
|
||||
while (num != 16)
|
||||
{
|
||||
}
|
||||
int num3 = 0;
|
||||
Pack.UInt32_To_BE(array, x, num3);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8E8 RID: 47336 RVA: 0x00281710 File Offset: 0x0027F910
|
||||
[Token(Token = "0x600B8E8")]
|
||||
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
||||
public Tables64kGcmMultiplier()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x04007499 RID: 29849
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007499")]
|
||||
private byte[] H;
|
||||
|
||||
// Token: 0x0400749A RID: 29850
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400749A")]
|
||||
private uint[][][] M;
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
|
||||
{
|
||||
// Token: 0x02001D28 RID: 7464
|
||||
[Token(Token = "0x2001D28")]
|
||||
public sealed class Tables8kGcmMultiplier : IGcmMultiplier
|
||||
{
|
||||
// Token: 0x0600B8E9 RID: 47337 RVA: 0x00281724 File Offset: 0x0027F924
|
||||
[Token(Token = "0x600B8E9")]
|
||||
[Address(RVA = "0x25C8E40", Offset = "0x25C7E40", VA = "0x1825C8E40", Slot = "4")]
|
||||
public void Init(byte[] H)
|
||||
{
|
||||
uint[][][] m3;
|
||||
for (;;)
|
||||
{
|
||||
if (this.M != (ulong)0L)
|
||||
{
|
||||
if (Arrays.AreEqual(this.H, H))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint[][][] array = new uint[32][][];
|
||||
this.M = array;
|
||||
}
|
||||
byte[] array2 = Arrays.Clone(H);
|
||||
uint[][][] m = this.M;
|
||||
this.H = array2;
|
||||
uint[][] array3 = new uint[16][];
|
||||
if (array3 != 0)
|
||||
{
|
||||
}
|
||||
m[0] = array3;
|
||||
uint[][][] m2 = this.M;
|
||||
uint[][] array4 = new uint[16][];
|
||||
if (array4 != 0)
|
||||
{
|
||||
}
|
||||
m2[1] = array4;
|
||||
uint[][] array5 = this.M[0];
|
||||
uint[] array6 = new uint[4];
|
||||
if (array6 != 0)
|
||||
{
|
||||
}
|
||||
array5[0] = array6;
|
||||
uint[][] array7 = this.M[1];
|
||||
uint[] array8 = new uint[4];
|
||||
if (array8 != 0)
|
||||
{
|
||||
}
|
||||
array7[0] = array8;
|
||||
uint[][] array9 = this.M[1];
|
||||
uint[] array10 = new uint[4];
|
||||
int num = 0;
|
||||
Pack.BE_To_UInt32(H, num, array10);
|
||||
if (array10 != 0)
|
||||
{
|
||||
}
|
||||
array9[8] = array10;
|
||||
m3 = this.M;
|
||||
uint[] array11 = m3[1][m3];
|
||||
if (m3 == 0)
|
||||
{
|
||||
}
|
||||
if (m3 != 0)
|
||||
{
|
||||
goto Block_2;
|
||||
}
|
||||
}
|
||||
return;
|
||||
Block_2:
|
||||
GcmUtilities.MultiplyP(m3);
|
||||
uint[][] array12 = this.M[1];
|
||||
throw new ArrayTypeMismatchException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B8EA RID: 47338 RVA: 0x00281A00 File Offset: 0x0027FC00
|
||||
[Token(Token = "0x600B8EA")]
|
||||
[Address(RVA = "0x25C99D0", Offset = "0x25C89D0", VA = "0x1825C99D0", Slot = "5")]
|
||||
public void MultiplyH(byte[] x)
|
||||
{
|
||||
uint[] array = this.z;
|
||||
int length = array.Length;
|
||||
int num = 0;
|
||||
Array.Clear(array, num, length);
|
||||
uint[][] array2 = this.M[length];
|
||||
uint[] array3 = this.z;
|
||||
byte b;
|
||||
uint[] array4 = array2[(int)b];
|
||||
uint[] array5 = this.z;
|
||||
uint[] array6 = this.z;
|
||||
uint[] array7 = this.z;
|
||||
uint[][][] m = this.M;
|
||||
int num2 = length + 1;
|
||||
uint[][] array8 = m[num2];
|
||||
uint[] array9 = this.z;
|
||||
byte b2;
|
||||
uint[] array10 = array8[(int)b2];
|
||||
uint[] array11 = this.z;
|
||||
uint[] array12 = this.z;
|
||||
uint[] array13 = this.z;
|
||||
uint num3 = array10[1];
|
||||
uint[] array14 = this.z;
|
||||
int num4 = 0;
|
||||
Pack.UInt32_To_BE(array14, x, num4);
|
||||
}
|
||||
|
||||
// Token: 0x0600B8EB RID: 47339 RVA: 0x00281AC8 File Offset: 0x0027FCC8
|
||||
[Token(Token = "0x600B8EB")]
|
||||
[Address(RVA = "0x25C9D70", Offset = "0x25C8D70", VA = "0x1825C9D70")]
|
||||
public Tables8kGcmMultiplier()
|
||||
{
|
||||
uint[] array = new uint[4];
|
||||
this.z = array;
|
||||
base..ctor();
|
||||
}
|
||||
|
||||
// Token: 0x0400749B RID: 29851
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400749B")]
|
||||
private byte[] H;
|
||||
|
||||
// Token: 0x0400749C RID: 29852
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400749C")]
|
||||
private uint[][][] M;
|
||||
|
||||
// Token: 0x0400749D RID: 29853
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400749D")]
|
||||
private uint[] z;
|
||||
}
|
||||
}
|
||||
+710
@@ -0,0 +1,710 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D18 RID: 7448
|
||||
[Token(Token = "0x2001D18")]
|
||||
public sealed class GcmBlockCipher : IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x0600B82C RID: 47148 RVA: 0x0027D940 File Offset: 0x0027BB40
|
||||
[Token(Token = "0x600B82C")]
|
||||
[Address(RVA = "0x22D99A0", Offset = "0x22D89A0", VA = "0x1822D99A0")]
|
||||
public GcmBlockCipher(IBlockCipher c)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B82C)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_37:
|
||||
stloc:ArgumentException(var_4_4C, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("cipher required with a block size of "), ldloc:int32[exp:object](var_3), ldstr:string[exp:object]("."))))
|
||||
}
|
||||
|
||||
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: 0x0600B82D RID: 47149 RVA: 0x0027D99C File Offset: 0x0027BB9C
|
||||
[Token(Token = "0x600B82D")]
|
||||
[Address(RVA = "0x22D9AB0", Offset = "0x22D8AB0", VA = "0x1822D9AB0")]
|
||||
public GcmBlockCipher(IBlockCipher c, IGcmMultiplier m)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B82D)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm.IGcmMultiplier)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_3B:
|
||||
stloc:ArgumentException(var_4_50, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("cipher required with a block size of "), ldloc:int32[exp:object](var_3), ldstr:string[exp:object]("."))))
|
||||
}
|
||||
|
||||
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: 0x17001D18 RID: 7448
|
||||
// (get) Token: 0x0600B82E RID: 47150 RVA: 0x0027D9FC File Offset: 0x0027BBFC
|
||||
[Token(Token = "0x17001D18")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B82E")]
|
||||
[Address(RVA = "0x22D9E90", Offset = "0x22D8E90", VA = "0x1822D9E90", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/GCM";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B82F RID: 47151 RVA: 0x0027DA24 File Offset: 0x0027BC24
|
||||
[Token(Token = "0x600B82F")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0", Slot = "5")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B830 RID: 47152 RVA: 0x0027DA38 File Offset: 0x0027BC38
|
||||
[Token(Token = "0x600B830")]
|
||||
[Address(RVA = "0x8BB9C0", Offset = "0x8BA9C0", VA = "0x1808BB9C0", Slot = "7")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x0600B831 RID: 47153 RVA: 0x0027DA48 File Offset: 0x0027BC48
|
||||
[Token(Token = "0x600B831")]
|
||||
[Address(RVA = "0x22D8820", Offset = "0x22D7820", VA = "0x1822D8820", Slot = "6")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B831)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_291:
|
||||
stloc:ArgumentException(var_45_29B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Key must be specified in initial init")))
|
||||
}
|
||||
|
||||
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: 0x0600B832 RID: 47154 RVA: 0x0027DCF4 File Offset: 0x0027BEF4
|
||||
[Token(Token = "0x600B832")]
|
||||
[Address(RVA = "0x22D84D0", Offset = "0x22D74D0", VA = "0x1822D84D0", Slot = "13")]
|
||||
public byte[] GetMac()
|
||||
{
|
||||
byte[] array = this.macBlock;
|
||||
if (array == 0)
|
||||
{
|
||||
}
|
||||
return Arrays.Clone(array);
|
||||
}
|
||||
|
||||
// Token: 0x0600B833 RID: 47155 RVA: 0x0027DD14 File Offset: 0x0027BF14
|
||||
[Token(Token = "0x600B833")]
|
||||
[Address(RVA = "0x22D8700", Offset = "0x22D7700", VA = "0x1822D8700", Slot = "15")]
|
||||
public int GetOutputSize(int len)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
int num2 = this.macSize;
|
||||
num += len;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
return num2 + num;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return num - num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B834 RID: 47156 RVA: 0x0027DD50 File Offset: 0x0027BF50
|
||||
[Token(Token = "0x600B834")]
|
||||
[Address(RVA = "0x22D8730", Offset = "0x22D7730", VA = "0x1822D8730", Slot = "14")]
|
||||
public int GetUpdateOutputSize(int len)
|
||||
{
|
||||
int num = this.bufOff;
|
||||
num += len;
|
||||
int num2;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
num2 = this.macSize;
|
||||
num -= num2;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
return num - num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B835 RID: 47157 RVA: 0x0027DD8C File Offset: 0x0027BF8C
|
||||
[Token(Token = "0x600B835")]
|
||||
[Address(RVA = "0x22D8F90", Offset = "0x22D7F90", VA = "0x1822D8F90", Slot = "8")]
|
||||
public void ProcessAadByte(byte input)
|
||||
{
|
||||
this.CheckStatus();
|
||||
byte[] array = this.atBlock;
|
||||
int num = this.atBlockPos;
|
||||
int num2 = this.atBlockPos;
|
||||
num2++;
|
||||
this.atBlockPos = num2;
|
||||
if (num2 == 16)
|
||||
{
|
||||
byte[] array2 = this.atBlock;
|
||||
byte[] s_at = this.S_at;
|
||||
this.gHASHBlock(s_at, array2);
|
||||
this.atBlockPos = (int)((ulong)0L);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B836 RID: 47158 RVA: 0x0027DDEC File Offset: 0x0027BFEC
|
||||
[Token(Token = "0x600B836")]
|
||||
[Address(RVA = "0x22D9020", Offset = "0x22D8020", VA = "0x1822D9020", Slot = "9")]
|
||||
public void ProcessAadBytes(byte[] inBytes, int inOff, int len)
|
||||
{
|
||||
this.CheckStatus();
|
||||
if (len > 0)
|
||||
{
|
||||
int num = 0;
|
||||
byte[] array = this.atBlock;
|
||||
int num2 = this.atBlockPos;
|
||||
int num3 = this.atBlockPos;
|
||||
num3++;
|
||||
this.atBlockPos = num3;
|
||||
if (num3 == 16)
|
||||
{
|
||||
byte[] array2 = this.atBlock;
|
||||
byte[] s_at = this.S_at;
|
||||
this.gHASHBlock(s_at, array2);
|
||||
this.atBlockPos = num;
|
||||
}
|
||||
num3 = inOff - inOff;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B837 RID: 47159 RVA: 0x0027DE60 File Offset: 0x0027C060
|
||||
[Token(Token = "0x600B837")]
|
||||
[Address(RVA = "0x22D8760", Offset = "0x22D7760", VA = "0x1822D8760")]
|
||||
private void InitCipher()
|
||||
{
|
||||
if (this.atLength > (ulong)0L)
|
||||
{
|
||||
byte[] s_atPre = this.S_atPre;
|
||||
int num = 0;
|
||||
byte[] s_at = this.S_at;
|
||||
int num2 = 0;
|
||||
ulong num3;
|
||||
Array.Copy(s_at, num2, s_atPre, num, (int)num3);
|
||||
ulong num4 = this.atLength;
|
||||
this.atLengthPre = num4;
|
||||
}
|
||||
int num5 = this.atBlockPos;
|
||||
if (num5 > 0)
|
||||
{
|
||||
byte[] array = this.atBlock;
|
||||
int num6 = 0;
|
||||
byte[] s_atPre2 = this.S_atPre;
|
||||
this.gHASHPartial(s_atPre2, array, num6, num5);
|
||||
}
|
||||
if (this.atLengthPre != (ulong)0L)
|
||||
{
|
||||
byte[] s = this.S;
|
||||
int num7 = 0;
|
||||
byte[] s_atPre3 = this.S_atPre;
|
||||
int num8 = 0;
|
||||
ulong num9;
|
||||
Array.Copy(s_atPre3, num8, s, num7, (int)num9);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B838 RID: 47160 RVA: 0x0027DF04 File Offset: 0x0027C104
|
||||
[Token(Token = "0x600B838")]
|
||||
[Address(RVA = "0x22D9300", Offset = "0x22D8300", VA = "0x1822D9300", Slot = "10")]
|
||||
public int ProcessByte(byte input, byte[] output, int outOff)
|
||||
{
|
||||
this.CheckStatus();
|
||||
byte[] array = this.bufBlock;
|
||||
int num = this.bufOff;
|
||||
int num2 = this.bufOff;
|
||||
byte[] array2 = this.bufBlock;
|
||||
num2++;
|
||||
this.bufOff = num2;
|
||||
if (num2 != array2.Length)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
this.ProcessBlock(array2, num4, output, outOff);
|
||||
int num7;
|
||||
if ((this.forEncryption ? 1 : 0) == num3)
|
||||
{
|
||||
byte[] array3 = this.bufBlock;
|
||||
int num5 = this.macSize;
|
||||
int num6 = 0;
|
||||
Array.Copy(array3, 16, array3, num6, num5);
|
||||
num7 = this.macSize;
|
||||
}
|
||||
this.bufOff = num7;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B839 RID: 47161 RVA: 0x0027DF9C File Offset: 0x0027C19C
|
||||
[Token(Token = "0x600B839")]
|
||||
[Address(RVA = "0x22D93E0", Offset = "0x22D83E0", VA = "0x1822D93E0", Slot = "11")]
|
||||
public int ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
this.CheckStatus();
|
||||
Check.DataLength(input, inOff, inOff, "input buffer too short");
|
||||
int num = 0;
|
||||
if ((this.forEncryption ? 1 : 0) == num)
|
||||
{
|
||||
if (len <= 0)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
byte[] array = this.bufBlock;
|
||||
int num2 = this.bufOff;
|
||||
int num3 = this.bufOff;
|
||||
byte[] array2 = this.bufBlock;
|
||||
num3++;
|
||||
this.bufOff = num3;
|
||||
if (num3 == array2.Length)
|
||||
{
|
||||
byte[] array3 = this.bufBlock;
|
||||
int num4 = 0;
|
||||
int num5 = this.macSize;
|
||||
Array.Copy(array3, 16, array3, num4, num5);
|
||||
int num6 = this.macSize;
|
||||
num += 16;
|
||||
this.bufOff = num6;
|
||||
}
|
||||
num3 = inOff - inOff;
|
||||
}
|
||||
if (this.bufOff != 0 && len > 0)
|
||||
{
|
||||
byte[] array4 = this.bufBlock;
|
||||
int num7 = this.bufOff;
|
||||
num7++;
|
||||
this.bufOff = num7;
|
||||
if (num7 == 16)
|
||||
{
|
||||
this.bufOff = num;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
}
|
||||
num += 16;
|
||||
while (len != 16)
|
||||
{
|
||||
}
|
||||
if (len > 0)
|
||||
{
|
||||
byte[] array5 = this.bufBlock;
|
||||
int num8 = 0;
|
||||
Array.Copy(input, inOff, array5, num8, len);
|
||||
this.bufOff = len;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B83A RID: 47162 RVA: 0x0027E0B4 File Offset: 0x0027C2B4
|
||||
[Token(Token = "0x600B83A")]
|
||||
[Address(RVA = "0x22D7F30", Offset = "0x22D6F30", VA = "0x1822D7F30", Slot = "12")]
|
||||
public int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B83A)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_2BD:
|
||||
stloc:InvalidCipherTextException(var_50_2C7, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in GCM failed")))
|
||||
}
|
||||
|
||||
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: 0x0600B83B RID: 47163 RVA: 0x0027E38C File Offset: 0x0027C58C
|
||||
[Token(Token = "0x600B83B")]
|
||||
[Address(RVA = "0x22D97F0", Offset = "0x22D87F0", VA = "0x1822D97F0", Slot = "16")]
|
||||
public void Reset()
|
||||
{
|
||||
this.Reset(true);
|
||||
}
|
||||
|
||||
// Token: 0x0600B83C RID: 47164 RVA: 0x0027E3A0 File Offset: 0x0027C5A0
|
||||
[Token(Token = "0x600B83C")]
|
||||
[Address(RVA = "0x22D9800", Offset = "0x22D8800", VA = "0x1822D9800")]
|
||||
private void Reset(bool clearMac)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array = new byte[16];
|
||||
this.S = array;
|
||||
byte[] array2 = new byte[16];
|
||||
this.S_at = array2;
|
||||
byte[] array3 = new byte[16];
|
||||
this.S_atPre = array3;
|
||||
byte[] array4 = new byte[16];
|
||||
byte[] j = this.J0;
|
||||
int num = 0;
|
||||
this.atBlockPos = num;
|
||||
this.atLength = (ulong)num;
|
||||
this.atLengthPre = (ulong)num;
|
||||
this.atBlock = array4;
|
||||
byte[] array5 = Arrays.Clone(j);
|
||||
byte[] array6 = this.bufBlock;
|
||||
this.counter = array5;
|
||||
this.blocksRemaining = (uint)((ulong)4294967294L);
|
||||
this.bufOff = num;
|
||||
this.totalLength = (ulong)num;
|
||||
if (array6 != 0)
|
||||
{
|
||||
int num2 = 0;
|
||||
Arrays.Fill(array6, (byte)num2);
|
||||
}
|
||||
if (clearMac)
|
||||
{
|
||||
this.macBlock = num;
|
||||
}
|
||||
if ((this.forEncryption ? 1 : 0) == num)
|
||||
{
|
||||
byte[] array7 = this.initialAssociatedText;
|
||||
if (array7 != 0)
|
||||
{
|
||||
int length = array7.Length;
|
||||
int num3 = 0;
|
||||
this.ProcessAadBytes(array7, num3, length);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B83D RID: 47165 RVA: 0x0027E4A4 File Offset: 0x0027C6A4
|
||||
[Token(Token = "0x600B83D")]
|
||||
[Address(RVA = "0x22D9120", Offset = "0x22D8120", VA = "0x1822D9120")]
|
||||
private void ProcessBlock(byte[] buf, int bufOff, byte[] output, int outOff)
|
||||
{
|
||||
if (this.totalLength == (ulong)0L)
|
||||
{
|
||||
this.InitCipher();
|
||||
}
|
||||
byte[] array = this.ctrBlock;
|
||||
this.GetNextCtrBlock(array);
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
GcmUtilities.Xor(this.S, buf, bufOff);
|
||||
IGcmMultiplier gcmMultiplier = this.multiplier;
|
||||
byte[] array2 = this.ctrBlock;
|
||||
}
|
||||
GcmUtilities.Xor(this.ctrBlock, buf, bufOff);
|
||||
byte[] array3 = this.ctrBlock;
|
||||
byte[] s = this.S;
|
||||
this.gHASHBlock(s, array3);
|
||||
byte[] array4 = this.ctrBlock;
|
||||
}
|
||||
|
||||
// Token: 0x0600B83E RID: 47166 RVA: 0x0027E52C File Offset: 0x0027C72C
|
||||
[Token(Token = "0x600B83E")]
|
||||
[Address(RVA = "0x22D96B0", Offset = "0x22D86B0", VA = "0x1822D96B0")]
|
||||
private void ProcessPartial(byte[] buf, int off, int len, byte[] output, int outOff)
|
||||
{
|
||||
byte[] array = this.ctrBlock;
|
||||
this.GetNextCtrBlock(array);
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
byte[] s = this.S;
|
||||
this.gHASHPartial(s, buf, len, len);
|
||||
byte[] array2 = this.ctrBlock;
|
||||
int num = 0;
|
||||
GcmUtilities.Xor(buf, off, array2, num, len);
|
||||
}
|
||||
byte[] array3 = this.ctrBlock;
|
||||
int num2 = 0;
|
||||
GcmUtilities.Xor(buf, off, array3, num2, len);
|
||||
byte[] s2 = this.S;
|
||||
this.gHASHPartial(s2, buf, off, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B83F RID: 47167 RVA: 0x0027E5A8 File Offset: 0x0027C7A8
|
||||
[Token(Token = "0x600B83F")]
|
||||
[Address(RVA = "0x22D9DC0", Offset = "0x22D8DC0", VA = "0x1822D9DC0")]
|
||||
private void gHASH(byte[] Y, byte[] b, int len)
|
||||
{
|
||||
int num = 0;
|
||||
if (len > 0)
|
||||
{
|
||||
int num2 = Math.Min(len, 16);
|
||||
this.gHASHPartial(Y, b, num, num2);
|
||||
num += 16;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B840 RID: 47168 RVA: 0x0027E5D4 File Offset: 0x0027C7D4
|
||||
[Token(Token = "0x600B840")]
|
||||
[Address(RVA = "0x22D9C70", Offset = "0x22D8C70", VA = "0x1822D9C70")]
|
||||
private void gHASHBlock(byte[] Y, byte[] b)
|
||||
{
|
||||
GcmUtilities.Xor(Y, b);
|
||||
IGcmMultiplier gcmMultiplier = this.multiplier;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B841 RID: 47169 RVA: 0x0027E5F4 File Offset: 0x0027C7F4
|
||||
[Token(Token = "0x600B841")]
|
||||
[Address(RVA = "0x22D9BC0", Offset = "0x22D8BC0", VA = "0x1822D9BC0")]
|
||||
private void gHASHBlock(byte[] Y, byte[] b, int off)
|
||||
{
|
||||
GcmUtilities.Xor(Y, b, off);
|
||||
IGcmMultiplier gcmMultiplier = this.multiplier;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B842 RID: 47170 RVA: 0x0027E618 File Offset: 0x0027C818
|
||||
[Token(Token = "0x600B842")]
|
||||
[Address(RVA = "0x22D9D10", Offset = "0x22D8D10", VA = "0x1822D9D10")]
|
||||
private void gHASHPartial(byte[] Y, byte[] b, int off, int len)
|
||||
{
|
||||
IGcmMultiplier gcmMultiplier = this.multiplier;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B843 RID: 47171 RVA: 0x0027E634 File Offset: 0x0027C834
|
||||
[Token(Token = "0x600B843")]
|
||||
[Address(RVA = "0x22D8550", Offset = "0x22D7550", VA = "0x1822D8550")]
|
||||
private void GetNextCtrBlock(byte[] block)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B843)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::GetNextCtrBlock(System.Byte[])
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_9E:
|
||||
stloc:InvalidOperationException(var_11_A8, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Attempt to process too many blocks")))
|
||||
}
|
||||
|
||||
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: 0x0600B844 RID: 47172 RVA: 0x0027E6EC File Offset: 0x0027C8EC
|
||||
[Token(Token = "0x600B844")]
|
||||
[Address(RVA = "0x22D7E90", Offset = "0x22D6E90", VA = "0x1822D7E90")]
|
||||
private void CheckStatus()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B844)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::CheckStatus()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_13:
|
||||
stloc:InvalidOperationException(var_0_1D, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("GCM cipher cannot be reused for encryption")))
|
||||
}
|
||||
|
||||
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: 0x0400742E RID: 29742
|
||||
[Token(Token = "0x400742E")]
|
||||
private const int BlockSize = 16;
|
||||
|
||||
// Token: 0x0400742F RID: 29743
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400742F")]
|
||||
private byte[] ctrBlock;
|
||||
|
||||
// Token: 0x04007430 RID: 29744
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007430")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x04007431 RID: 29745
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007431")]
|
||||
private readonly IGcmMultiplier multiplier;
|
||||
|
||||
// Token: 0x04007432 RID: 29746
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007432")]
|
||||
private IGcmExponentiator exp;
|
||||
|
||||
// Token: 0x04007433 RID: 29747
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007433")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x04007434 RID: 29748
|
||||
[FieldOffset(Offset = "0x31")]
|
||||
[Token(Token = "0x4007434")]
|
||||
private bool initialised;
|
||||
|
||||
// Token: 0x04007435 RID: 29749
|
||||
[FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x4007435")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x04007436 RID: 29750
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007436")]
|
||||
private byte[] lastKey;
|
||||
|
||||
// Token: 0x04007437 RID: 29751
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007437")]
|
||||
private byte[] nonce;
|
||||
|
||||
// Token: 0x04007438 RID: 29752
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4007438")]
|
||||
private byte[] initialAssociatedText;
|
||||
|
||||
// Token: 0x04007439 RID: 29753
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4007439")]
|
||||
private byte[] H;
|
||||
|
||||
// Token: 0x0400743A RID: 29754
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x400743A")]
|
||||
private byte[] J0;
|
||||
|
||||
// Token: 0x0400743B RID: 29755
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x400743B")]
|
||||
private byte[] bufBlock;
|
||||
|
||||
// Token: 0x0400743C RID: 29756
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x400743C")]
|
||||
private byte[] macBlock;
|
||||
|
||||
// Token: 0x0400743D RID: 29757
|
||||
[FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x400743D")]
|
||||
private byte[] S;
|
||||
|
||||
// Token: 0x0400743E RID: 29758
|
||||
[FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x400743E")]
|
||||
private byte[] S_at;
|
||||
|
||||
// Token: 0x0400743F RID: 29759
|
||||
[FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x400743F")]
|
||||
private byte[] S_atPre;
|
||||
|
||||
// Token: 0x04007440 RID: 29760
|
||||
[FieldOffset(Offset = "0x88")]
|
||||
[Token(Token = "0x4007440")]
|
||||
private byte[] counter;
|
||||
|
||||
// Token: 0x04007441 RID: 29761
|
||||
[FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x4007441")]
|
||||
private uint blocksRemaining;
|
||||
|
||||
// Token: 0x04007442 RID: 29762
|
||||
[FieldOffset(Offset = "0x94")]
|
||||
[Token(Token = "0x4007442")]
|
||||
private int bufOff;
|
||||
|
||||
// Token: 0x04007443 RID: 29763
|
||||
[FieldOffset(Offset = "0x98")]
|
||||
[Token(Token = "0x4007443")]
|
||||
private ulong totalLength;
|
||||
|
||||
// Token: 0x04007444 RID: 29764
|
||||
[FieldOffset(Offset = "0xA0")]
|
||||
[Token(Token = "0x4007444")]
|
||||
private byte[] atBlock;
|
||||
|
||||
// Token: 0x04007445 RID: 29765
|
||||
[FieldOffset(Offset = "0xA8")]
|
||||
[Token(Token = "0x4007445")]
|
||||
private int atBlockPos;
|
||||
|
||||
// Token: 0x04007446 RID: 29766
|
||||
[FieldOffset(Offset = "0xB0")]
|
||||
[Token(Token = "0x4007446")]
|
||||
private ulong atLength;
|
||||
|
||||
// Token: 0x04007447 RID: 29767
|
||||
[FieldOffset(Offset = "0xB8")]
|
||||
[Token(Token = "0x4007447")]
|
||||
private ulong atLengthPre;
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D1A RID: 7450
|
||||
[Token(Token = "0x2001D1A")]
|
||||
public interface IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x17001D1B RID: 7451
|
||||
// (get) Token: 0x0600B84F RID: 47183
|
||||
[Token(Token = "0x17001D1B")]
|
||||
string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B84F")]
|
||||
[Address(Slot = "0")]
|
||||
get;
|
||||
}
|
||||
|
||||
// Token: 0x0600B850 RID: 47184
|
||||
[Token(Token = "0x600B850")]
|
||||
[Address(Slot = "1")]
|
||||
IBlockCipher GetUnderlyingCipher();
|
||||
|
||||
// Token: 0x0600B851 RID: 47185
|
||||
[Token(Token = "0x600B851")]
|
||||
[Address(Slot = "2")]
|
||||
void Init(bool forEncryption, ICipherParameters parameters);
|
||||
|
||||
// Token: 0x0600B852 RID: 47186
|
||||
[Token(Token = "0x600B852")]
|
||||
[Address(Slot = "3")]
|
||||
int GetBlockSize();
|
||||
|
||||
// Token: 0x0600B853 RID: 47187
|
||||
[Token(Token = "0x600B853")]
|
||||
[Address(Slot = "4")]
|
||||
void ProcessAadByte(byte input);
|
||||
|
||||
// Token: 0x0600B854 RID: 47188
|
||||
[Token(Token = "0x600B854")]
|
||||
[Address(Slot = "5")]
|
||||
void ProcessAadBytes(byte[] inBytes, int inOff, int len);
|
||||
|
||||
// Token: 0x0600B855 RID: 47189
|
||||
[Token(Token = "0x600B855")]
|
||||
[Address(Slot = "6")]
|
||||
int ProcessByte(byte input, byte[] outBytes, int outOff);
|
||||
|
||||
// Token: 0x0600B856 RID: 47190
|
||||
[Token(Token = "0x600B856")]
|
||||
[Address(Slot = "7")]
|
||||
int ProcessBytes(byte[] inBytes, int inOff, int len, byte[] outBytes, int outOff);
|
||||
|
||||
// Token: 0x0600B857 RID: 47191
|
||||
[Token(Token = "0x600B857")]
|
||||
[Address(Slot = "8")]
|
||||
int DoFinal(byte[] outBytes, int outOff);
|
||||
|
||||
// Token: 0x0600B858 RID: 47192
|
||||
[Token(Token = "0x600B858")]
|
||||
[Address(Slot = "9")]
|
||||
byte[] GetMac();
|
||||
|
||||
// Token: 0x0600B859 RID: 47193
|
||||
[Token(Token = "0x600B859")]
|
||||
[Address(Slot = "10")]
|
||||
int GetUpdateOutputSize(int len);
|
||||
|
||||
// Token: 0x0600B85A RID: 47194
|
||||
[Token(Token = "0x600B85A")]
|
||||
[Address(Slot = "11")]
|
||||
int GetOutputSize(int len);
|
||||
|
||||
// Token: 0x0600B85B RID: 47195
|
||||
[Token(Token = "0x600B85B")]
|
||||
[Address(Slot = "12")]
|
||||
void Reset();
|
||||
}
|
||||
}
|
||||
+602
@@ -0,0 +1,602 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D1B RID: 7451
|
||||
[Token(Token = "0x2001D1B")]
|
||||
public class KCcmBlockCipher : IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x0600B85C RID: 47196 RVA: 0x0027EA6C File Offset: 0x0027CC6C
|
||||
[Token(Token = "0x600B85C")]
|
||||
[Address(RVA = "0x22DD760", Offset = "0x22DC760", VA = "0x1822DD760")]
|
||||
private void setNb(int Nb)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B85C)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::setNb(System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_0C:
|
||||
stloc:ArgumentException(var_0_16, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Nb = 4 is recommended by DSTU7624 but can be changed to only 6 or 8 in this implementation")))
|
||||
}
|
||||
|
||||
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: 0x0600B85D RID: 47197 RVA: 0x0027EA90 File Offset: 0x0027CC90
|
||||
[Token(Token = "0x600B85D")]
|
||||
[Address(RVA = "0x22DD220", Offset = "0x22DC220", VA = "0x1822DD220")]
|
||||
public KCcmBlockCipher(IBlockCipher engine)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B85E RID: 47198 RVA: 0x0027EAA0 File Offset: 0x0027CCA0
|
||||
[Token(Token = "0x600B85E")]
|
||||
[Address(RVA = "0x22DD230", Offset = "0x22DC230", VA = "0x1822DD230")]
|
||||
public KCcmBlockCipher(IBlockCipher engine, int Nb)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B85E)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_D8:
|
||||
stloc:ArgumentException(var_10_E2, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Nb = 4 is recommended by DSTU7624 but can be changed to only 6 or 8 in this implementation")))
|
||||
}
|
||||
|
||||
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: 0x0600B85F RID: 47199 RVA: 0x0027EB90 File Offset: 0x0027CD90
|
||||
[Token(Token = "0x600B85F")]
|
||||
[Address(RVA = "0x22DB6D0", Offset = "0x22DA6D0", VA = "0x1822DB6D0", Slot = "17")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B85F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_B9:
|
||||
stloc:ArgumentException(var_15_C3, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Invalid mac size specified")))
|
||||
}
|
||||
|
||||
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: 0x17001D1C RID: 7452
|
||||
// (get) Token: 0x0600B860 RID: 47200 RVA: 0x0027EC64 File Offset: 0x0027CE64
|
||||
[Token(Token = "0x17001D1C")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B860")]
|
||||
[Address(RVA = "0x22DD660", Offset = "0x22DC660", VA = "0x1822DD660", Slot = "18")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.engine;
|
||||
return 0 + "/KCCM";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B861 RID: 47201 RVA: 0x0027EC8C File Offset: 0x0027CE8C
|
||||
[Token(Token = "0x600B861")]
|
||||
[Address(RVA = "0x22DB610", Offset = "0x22DA610", VA = "0x1822DB610", Slot = "19")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.engine;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B862 RID: 47202 RVA: 0x0027ECA8 File Offset: 0x0027CEA8
|
||||
[Token(Token = "0x600B862")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530", Slot = "20")]
|
||||
public virtual IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.engine;
|
||||
}
|
||||
|
||||
// Token: 0x0600B863 RID: 47203 RVA: 0x0027ECBC File Offset: 0x0027CEBC
|
||||
[Token(Token = "0x600B863")]
|
||||
[Address(RVA = "0x22DC200", Offset = "0x22DB200", VA = "0x1822DC200", Slot = "21")]
|
||||
public virtual void ProcessAadByte(byte input)
|
||||
{
|
||||
((IDisposable)this.associatedText).Dispose();
|
||||
}
|
||||
|
||||
// Token: 0x0600B864 RID: 47204 RVA: 0x0027ECDC File Offset: 0x0027CEDC
|
||||
[Token(Token = "0x600B864")]
|
||||
[Address(RVA = "0x22DC230", Offset = "0x22DB230", VA = "0x1822DC230", Slot = "22")]
|
||||
public virtual void ProcessAadBytes(byte[] input, int inOff, int len)
|
||||
{
|
||||
int num = this.associatedText.Read(input, inOff, len);
|
||||
}
|
||||
|
||||
// Token: 0x0600B865 RID: 47205 RVA: 0x0027ED00 File Offset: 0x0027CF00
|
||||
[Token(Token = "0x600B865")]
|
||||
[Address(RVA = "0x22DBB60", Offset = "0x22DAB60", VA = "0x1822DBB60")]
|
||||
private void ProcessAAD(byte[] assocText, int assocOff, int assocLen, int dataLen)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B865)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::ProcessAAD(System.Byte[],System.Int32,System.Int32,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_1CD:
|
||||
stloc:IBlockCipher(var_40_1D3, ldfld:IBlockCipher(KCcmBlockCipher::engine, ldloc:KCcmBlockCipher(this)))
|
||||
stloc:uint8[](var_41_1DB, ldfld:uint8[](KCcmBlockCipher::macBlock, ldloc:KCcmBlockCipher(this)))
|
||||
stloc:ArgumentException(var_42_1E7, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("authText buffer too short")))
|
||||
}
|
||||
|
||||
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: 0x0600B866 RID: 47206 RVA: 0x0027EEF8 File Offset: 0x0027D0F8
|
||||
[Token(Token = "0x600B866")]
|
||||
[Address(RVA = "0x22DC4F0", Offset = "0x22DB4F0", VA = "0x1822DC4F0", Slot = "23")]
|
||||
public virtual int ProcessByte(byte input, byte[] output, int outOff)
|
||||
{
|
||||
MemoryStream memoryStream = this.data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600B867 RID: 47207 RVA: 0x0027EF14 File Offset: 0x0027D114
|
||||
[Token(Token = "0x600B867")]
|
||||
[Address(RVA = "0x22DC520", Offset = "0x22DB520", VA = "0x1822DC520", Slot = "24")]
|
||||
public virtual int ProcessBytes(byte[] input, int inOff, int inLen, byte[] output, int outOff)
|
||||
{
|
||||
Check.DataLength(input, inOff, inOff, "input buffer too short");
|
||||
int num = this.data.ReadByte();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Token: 0x0600B868 RID: 47208 RVA: 0x0027EF44 File Offset: 0x0027D144
|
||||
[Token(Token = "0x600B868")]
|
||||
[Address(RVA = "0x22DC5C0", Offset = "0x22DB5C0", VA = "0x1822DC5C0")]
|
||||
public int ProcessPacket(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
byte[] array11;
|
||||
byte[] array12;
|
||||
do
|
||||
{
|
||||
Check.DataLength(input, inOff, inOff, "input buffer too short");
|
||||
if (this.associatedText.CanWrite > false)
|
||||
{
|
||||
MemoryStream memoryStream = this.associatedText;
|
||||
bool canWrite = this.associatedText.CanWrite;
|
||||
MemoryStream memoryStream2 = this.data;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
bool canWrite2 = memoryStream2.CanWrite;
|
||||
}
|
||||
bool canWrite3 = memoryStream2.CanWrite;
|
||||
}
|
||||
IBlockCipher blockCipher = this.engine;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int num = this.macSize;
|
||||
Check.DataLength(typeof(IBlockCipher).TypeHandle != 0, "partial blocks not supported");
|
||||
IBlockCipher blockCipher2 = this.engine;
|
||||
byte[] array = this.s;
|
||||
int num2 = 0;
|
||||
IBlockCipher blockCipher3 = this.engine;
|
||||
if (len > 0)
|
||||
{
|
||||
IBlockCipher blockCipher4 = this.engine;
|
||||
int num3 = 0;
|
||||
if (num3 < inOff)
|
||||
{
|
||||
num3 += num3;
|
||||
num3++;
|
||||
}
|
||||
IBlockCipher blockCipher5 = this.engine;
|
||||
int num4 = 0;
|
||||
uint num5;
|
||||
if (num4 < (int)num5)
|
||||
{
|
||||
num4 += num4;
|
||||
num4++;
|
||||
}
|
||||
num2++;
|
||||
}
|
||||
byte[] array2 = this.counter;
|
||||
uint num6;
|
||||
if (num6 < (uint)array2.Length)
|
||||
{
|
||||
byte[] array3 = this.s;
|
||||
num6 += (uint)1;
|
||||
byte[] array4 = this.counter;
|
||||
array4 += array4;
|
||||
array4 += array4;
|
||||
}
|
||||
IBlockCipher blockCipher6 = this.engine;
|
||||
byte[] array5 = this.buffer;
|
||||
if (this.macSize > 0)
|
||||
{
|
||||
byte[] array6 = this.buffer;
|
||||
int num7 = this.macSize;
|
||||
}
|
||||
byte[] array7 = this.counter;
|
||||
if (num6 < (uint)array7.Length)
|
||||
{
|
||||
byte[] array8 = this.s;
|
||||
num6 += (uint)1;
|
||||
if (this.counter != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
IBlockCipher blockCipher7 = this.engine;
|
||||
byte[] array9 = this.buffer;
|
||||
int num8 = this.macSize;
|
||||
int num9 = this.macSize;
|
||||
int num10 = 0;
|
||||
byte[] array10 = this.mac;
|
||||
int num11 = 0;
|
||||
Array.Copy(this.macBlock, num11, array10, num10, num9);
|
||||
array11 = new byte[this.macSize];
|
||||
int num12 = this.macSize;
|
||||
int num13 = 0;
|
||||
int num14 = 0;
|
||||
Array.Copy(this.buffer, num13, array11, num14, num12);
|
||||
array12 = this.mac;
|
||||
}
|
||||
while (!Arrays.ConstantTimeAreEqual(array12, array11));
|
||||
Check.DataLength(typeof(IBlockCipher).TypeHandle != 0, "partial blocks not supported");
|
||||
int num18;
|
||||
if (len > 0)
|
||||
{
|
||||
int num15 = 0;
|
||||
if (num15 < array12)
|
||||
{
|
||||
num15 += num15;
|
||||
num15++;
|
||||
}
|
||||
int num16 = 0;
|
||||
uint num17;
|
||||
if (num16 < (int)num17)
|
||||
{
|
||||
num16 += num16;
|
||||
num16++;
|
||||
}
|
||||
array12 += num16;
|
||||
num18 = 0;
|
||||
uint num19;
|
||||
if (num18 < (int)num19)
|
||||
{
|
||||
num18 += num18;
|
||||
num18++;
|
||||
}
|
||||
}
|
||||
uint num20;
|
||||
num20 += (uint)1;
|
||||
while (num18 != 0)
|
||||
{
|
||||
}
|
||||
num18 += num18;
|
||||
num18 += 2;
|
||||
num18 += 19;
|
||||
num18 += num18;
|
||||
num18 += 2;
|
||||
num18 += 19;
|
||||
num18 += num18;
|
||||
num18 += 2;
|
||||
num18 += 19;
|
||||
if (num18 > 0)
|
||||
{
|
||||
num20 += (uint)1;
|
||||
}
|
||||
num20 += (uint)len;
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B869 RID: 47209 RVA: 0x0027F210 File Offset: 0x0027D410
|
||||
[Token(Token = "0x600B869")]
|
||||
[Address(RVA = "0x22DC260", Offset = "0x22DB260", VA = "0x1822DC260")]
|
||||
private void ProcessBlock(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
do
|
||||
{
|
||||
byte[] array = this.counter;
|
||||
int num = 0;
|
||||
if (num < array.Length)
|
||||
{
|
||||
byte[] array2 = this.s;
|
||||
num++;
|
||||
byte[] array3 = this.counter;
|
||||
}
|
||||
IBlockCipher blockCipher = this.engine;
|
||||
byte[] array4 = this.buffer;
|
||||
IBlockCipher blockCipher2 = this.engine;
|
||||
int num2 = 0;
|
||||
if (num2 < blockCipher)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
if (num2 >= num2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
byte[] array5 = this.buffer;
|
||||
}
|
||||
while (this.engine != 0);
|
||||
byte b;
|
||||
b += b;
|
||||
}
|
||||
|
||||
// Token: 0x0600B86A RID: 47210 RVA: 0x0027F294 File Offset: 0x0027D494
|
||||
[Token(Token = "0x600B86A")]
|
||||
[Address(RVA = "0x22DB3F0", Offset = "0x22DA3F0", VA = "0x1822DB3F0")]
|
||||
private void CalculateMac(byte[] authText, int authOff, int len)
|
||||
{
|
||||
if (len > 0)
|
||||
{
|
||||
int num = 0;
|
||||
IBlockCipher blockCipher = this.engine;
|
||||
byte[] array = this.macBlock;
|
||||
num += array;
|
||||
num++;
|
||||
IBlockCipher blockCipher2 = this.engine;
|
||||
byte[] array2 = this.macBlock;
|
||||
IBlockCipher blockCipher3 = this.engine;
|
||||
IBlockCipher blockCipher4 = this.engine;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B86B RID: 47211 RVA: 0x0027F2E4 File Offset: 0x0027D4E4
|
||||
[Token(Token = "0x600B86B")]
|
||||
[Address(RVA = "0x22DB560", Offset = "0x22DA560", VA = "0x1822DB560", Slot = "25")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
MemoryStream memoryStream = this.data;
|
||||
bool canWrite = this.data.CanWrite;
|
||||
return outOff;
|
||||
}
|
||||
|
||||
// Token: 0x0600B86C RID: 47212 RVA: 0x0027F30C File Offset: 0x0027D50C
|
||||
[Token(Token = "0x600B86C")]
|
||||
[Address(RVA = "0x22DB660", Offset = "0x22DA660", VA = "0x1822DB660", Slot = "26")]
|
||||
public virtual byte[] GetMac()
|
||||
{
|
||||
return Arrays.Clone(this.mac);
|
||||
}
|
||||
|
||||
// Token: 0x0600B86D RID: 47213 RVA: 0x0027F324 File Offset: 0x0027D524
|
||||
[Token(Token = "0x600B86D")]
|
||||
[Address(RVA = "0x5028A0", Offset = "0x5018A0", VA = "0x1805028A0", Slot = "27")]
|
||||
public virtual int GetUpdateOutputSize(int len)
|
||||
{
|
||||
return len;
|
||||
}
|
||||
|
||||
// Token: 0x0600B86E RID: 47214 RVA: 0x0027F334 File Offset: 0x0027D534
|
||||
[Token(Token = "0x600B86E")]
|
||||
[Address(RVA = "0x22DB6C0", Offset = "0x22DA6C0", VA = "0x1822DB6C0", Slot = "28")]
|
||||
public virtual int GetOutputSize(int len)
|
||||
{
|
||||
int num = this.macSize;
|
||||
return num + len;
|
||||
}
|
||||
|
||||
// Token: 0x0600B86F RID: 47215 RVA: 0x0027F350 File Offset: 0x0027D550
|
||||
[Token(Token = "0x600B86F")]
|
||||
[Address(RVA = "0x22DD080", Offset = "0x22DC080", VA = "0x1822DD080", Slot = "29")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
byte[] g = this.G1;
|
||||
int num = 0;
|
||||
Arrays.Fill(g, (byte)num);
|
||||
byte[] array = this.buffer;
|
||||
int num2 = 0;
|
||||
Arrays.Fill(array, (byte)num2);
|
||||
byte[] array2 = this.counter;
|
||||
int num3 = 0;
|
||||
Arrays.Fill(array2, (byte)num3);
|
||||
byte[] array3 = this.macBlock;
|
||||
int num4 = 0;
|
||||
Arrays.Fill(array3, (byte)num4);
|
||||
byte[] array4 = this.counter;
|
||||
MemoryStream memoryStream = this.data;
|
||||
MemoryStream memoryStream2 = this.associatedText;
|
||||
byte[] array5 = this.initialAssociatedText;
|
||||
if (array5 != 0)
|
||||
{
|
||||
this.ProcessAadByte(array5);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B870 RID: 47216 RVA: 0x0027F3D8 File Offset: 0x0027D5D8
|
||||
[Token(Token = "0x600B870")]
|
||||
[Address(RVA = "0x22DD6C0", Offset = "0x22DC6C0", VA = "0x1822DD6C0")]
|
||||
private void intToBytes(int num, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num2 = outOff + 1;
|
||||
}
|
||||
|
||||
// Token: 0x0600B871 RID: 47217 RVA: 0x0027F3F0 File Offset: 0x0027D5F0
|
||||
[Token(Token = "0x600B871")]
|
||||
[Address(RVA = "0x22DD480", Offset = "0x22DC480", VA = "0x1822DD480")]
|
||||
private byte getFlag(bool authTextPresents, int macSize)
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (authTextPresents)
|
||||
{
|
||||
}
|
||||
StringBuilder stringBuilder2 = stringBuilder.Append("0");
|
||||
if (macSize > 16)
|
||||
{
|
||||
if (macSize == 32)
|
||||
{
|
||||
}
|
||||
if (macSize == 48)
|
||||
{
|
||||
}
|
||||
if (macSize != 64)
|
||||
{
|
||||
goto IL_3F;
|
||||
}
|
||||
}
|
||||
if (macSize == 8)
|
||||
{
|
||||
}
|
||||
if (macSize == 16)
|
||||
{
|
||||
StringBuilder stringBuilder3 = stringBuilder.Append("011");
|
||||
}
|
||||
IL_3F:
|
||||
string text = Convert.ToString(this.Nb_ - 1, 2);
|
||||
int num2;
|
||||
if (text.m_stringLength < 4)
|
||||
{
|
||||
StringBuilder stringBuilder4 = new StringBuilder(text);
|
||||
int num = 0;
|
||||
num2 = stringBuilder4.Insert(num, "0").GetHashCode();
|
||||
}
|
||||
num2 = stringBuilder.GetHashCode();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04007452 RID: 29778
|
||||
[Token(Token = "0x4007452")]
|
||||
private static readonly int BYTES_IN_INT;
|
||||
|
||||
// Token: 0x04007453 RID: 29779
|
||||
[Token(Token = "0x4007453")]
|
||||
private static readonly int BITS_IN_BYTE;
|
||||
|
||||
// Token: 0x04007454 RID: 29780
|
||||
[Token(Token = "0x4007454")]
|
||||
private static readonly int MAX_MAC_BIT_LENGTH;
|
||||
|
||||
// Token: 0x04007455 RID: 29781
|
||||
[Token(Token = "0x4007455")]
|
||||
private static readonly int MIN_MAC_BIT_LENGTH;
|
||||
|
||||
// Token: 0x04007456 RID: 29782
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007456")]
|
||||
private IBlockCipher engine;
|
||||
|
||||
// Token: 0x04007457 RID: 29783
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007457")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x04007458 RID: 29784
|
||||
[FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x4007458")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x04007459 RID: 29785
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007459")]
|
||||
private byte[] initialAssociatedText;
|
||||
|
||||
// Token: 0x0400745A RID: 29786
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400745A")]
|
||||
private byte[] mac;
|
||||
|
||||
// Token: 0x0400745B RID: 29787
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400745B")]
|
||||
private byte[] macBlock;
|
||||
|
||||
// Token: 0x0400745C RID: 29788
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400745C")]
|
||||
private byte[] nonce;
|
||||
|
||||
// Token: 0x0400745D RID: 29789
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x400745D")]
|
||||
private byte[] G1;
|
||||
|
||||
// Token: 0x0400745E RID: 29790
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x400745E")]
|
||||
private byte[] buffer;
|
||||
|
||||
// Token: 0x0400745F RID: 29791
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x400745F")]
|
||||
private byte[] s;
|
||||
|
||||
// Token: 0x04007460 RID: 29792
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4007460")]
|
||||
private byte[] counter;
|
||||
|
||||
// Token: 0x04007461 RID: 29793
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4007461")]
|
||||
private readonly MemoryStream associatedText;
|
||||
|
||||
// Token: 0x04007462 RID: 29794
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x4007462")]
|
||||
private readonly MemoryStream data;
|
||||
|
||||
// Token: 0x04007463 RID: 29795
|
||||
[FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x4007463")]
|
||||
private int Nb_;
|
||||
}
|
||||
}
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D1C RID: 7452
|
||||
[Token(Token = "0x2001D1C")]
|
||||
public class KCtrBlockCipher : IStreamCipher, IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B873 RID: 47219 RVA: 0x0027F494 File Offset: 0x0027D694
|
||||
[Token(Token = "0x600B873")]
|
||||
[Address(RVA = "0x22DE090", Offset = "0x22DD090", VA = "0x1822DE090")]
|
||||
public KCtrBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
this.checkCounter();
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[0];
|
||||
this.IV = array;
|
||||
this.blockSize = array;
|
||||
byte[] array2 = new byte[array];
|
||||
this.ofbV = array2;
|
||||
byte[] array3 = new byte[array2];
|
||||
this.ofbOutV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B874 RID: 47220 RVA: 0x0027F4E8 File Offset: 0x0027D6E8
|
||||
[Token(Token = "0x600B874")]
|
||||
[Address(RVA = "0x41CEF0", Offset = "0x41BEF0", VA = "0x18041CEF0")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B875 RID: 47221 RVA: 0x0027F4FC File Offset: 0x0027D6FC
|
||||
[Token(Token = "0x600B875")]
|
||||
[Address(RVA = "0x22DD9A0", Offset = "0x22DC9A0", VA = "0x1822DD9A0", Slot = "10")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B875)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCtrBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_95:
|
||||
stloc:ArgumentException(var_14_9F, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Invalid 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: 0x17001D1D RID: 7453
|
||||
// (get) Token: 0x0600B876 RID: 47222 RVA: 0x0027F5AC File Offset: 0x0027D7AC
|
||||
[Token(Token = "0x17001D1D")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B876")]
|
||||
[Address(RVA = "0x22DE170", Offset = "0x22DD170", VA = "0x1822DE170", Slot = "9")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/KCTR";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D1E RID: 7454
|
||||
// (get) Token: 0x0600B877 RID: 47223 RVA: 0x0027F5D4 File Offset: 0x0027D7D4
|
||||
[Token(Token = "0x17001D1E")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B877")]
|
||||
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "12")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B878 RID: 47224 RVA: 0x0027F5E4 File Offset: 0x0027D7E4
|
||||
[Token(Token = "0x600B878")]
|
||||
[Address(RVA = "0x22DD950", Offset = "0x22DC950", VA = "0x1822DD950", Slot = "11")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B879 RID: 47225 RVA: 0x0027F600 File Offset: 0x0027D800
|
||||
[Token(Token = "0x600B879")]
|
||||
[Address(RVA = "0x22DE080", Offset = "0x22DD080", VA = "0x1822DE080", Slot = "6")]
|
||||
public byte ReturnByte(byte input)
|
||||
{
|
||||
return this.CalculateByte(input);
|
||||
}
|
||||
|
||||
// Token: 0x0600B87A RID: 47226 RVA: 0x0027F614 File Offset: 0x0027D814
|
||||
[Token(Token = "0x600B87A")]
|
||||
[Address(RVA = "0x22DDE90", Offset = "0x22DCE90", VA = "0x1822DDE90", Slot = "7")]
|
||||
public void ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
byte b2;
|
||||
byte b = this.CalculateByte(b2);
|
||||
}
|
||||
|
||||
// Token: 0x0600B87B RID: 47227 RVA: 0x0027F630 File Offset: 0x0027D830
|
||||
[Token(Token = "0x600B87B")]
|
||||
[Address(RVA = "0x22DD7E0", Offset = "0x22DC7E0", VA = "0x1822DD7E0")]
|
||||
protected byte CalculateByte(byte b)
|
||||
{
|
||||
int num = this.byteCount;
|
||||
if (num != 0)
|
||||
{
|
||||
byte[] array = this.ofbOutV;
|
||||
int num2 = num + 1;
|
||||
this.byteCount = num2;
|
||||
byte[] array2 = this.ofbV;
|
||||
if (num2 == array2.Length)
|
||||
{
|
||||
int num3 = 0;
|
||||
this.byteCount = num3;
|
||||
}
|
||||
byte b2;
|
||||
return b2;
|
||||
}
|
||||
byte[] array3 = this.ofbV;
|
||||
int num4 = 0;
|
||||
if (num4 < array3.Length)
|
||||
{
|
||||
num4++;
|
||||
if (num4 == array3.Length)
|
||||
{
|
||||
byte[] array4 = this.ofbV;
|
||||
}
|
||||
}
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array5 = this.ofbOutV;
|
||||
int num5 = this.byteCount;
|
||||
byte[] array6 = this.ofbOutV;
|
||||
int num6 = num5 + 1;
|
||||
this.byteCount = num6;
|
||||
byte b3;
|
||||
return b3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B87C RID: 47228 RVA: 0x0027F6E4 File Offset: 0x0027D8E4
|
||||
[Token(Token = "0x600B87C")]
|
||||
[Address(RVA = "0x22DDBC0", Offset = "0x22DCBC0", VA = "0x1822DDBC0", Slot = "13")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = input.Length;
|
||||
num -= inOff;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
int length = output.Length;
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte b2;
|
||||
byte b = this.CalculateByte(b2);
|
||||
this.ofbOutV = b;
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B87D RID: 47229 RVA: 0x0027F738 File Offset: 0x0027D938
|
||||
[Token(Token = "0x600B87D")]
|
||||
[Address(RVA = "0x22DDFF0", Offset = "0x22DCFF0", VA = "0x1822DDFF0", Slot = "14")]
|
||||
public void Reset()
|
||||
{
|
||||
if (this.initialised)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array = this.ofbV;
|
||||
}
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
this.byteCount = (int)((ulong)0L);
|
||||
}
|
||||
|
||||
// Token: 0x0600B87E RID: 47230 RVA: 0x0027F774 File Offset: 0x0027D974
|
||||
[Token(Token = "0x600B87E")]
|
||||
[Address(RVA = "0x22DE1D0", Offset = "0x22DD1D0", VA = "0x1822DE1D0")]
|
||||
private void incrementCounterAt(int pos)
|
||||
{
|
||||
byte[] array = this.ofbV;
|
||||
if (pos < array.Length && pos == array.Length)
|
||||
{
|
||||
byte[] array2 = this.ofbV;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B87F RID: 47231 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600B87F")]
|
||||
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0")]
|
||||
private void checkCounter()
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x04007464 RID: 29796
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007464")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x04007465 RID: 29797
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007465")]
|
||||
private byte[] ofbV;
|
||||
|
||||
// Token: 0x04007466 RID: 29798
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007466")]
|
||||
private byte[] ofbOutV;
|
||||
|
||||
// Token: 0x04007467 RID: 29799
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007467")]
|
||||
private bool initialised;
|
||||
|
||||
// Token: 0x04007468 RID: 29800
|
||||
[FieldOffset(Offset = "0x2C")]
|
||||
[Token(Token = "0x4007468")]
|
||||
private int byteCount;
|
||||
|
||||
// Token: 0x04007469 RID: 29801
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007469")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x0400746A RID: 29802
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400746A")]
|
||||
private readonly IBlockCipher cipher;
|
||||
}
|
||||
}
|
||||
+630
@@ -0,0 +1,630 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D1D RID: 7453
|
||||
[Token(Token = "0x2001D1D")]
|
||||
public class OcbBlockCipher : IAeadBlockCipher
|
||||
{
|
||||
// Token: 0x0600B880 RID: 47232 RVA: 0x0027F7A8 File Offset: 0x0027D9A8
|
||||
[Token(Token = "0x600B880")]
|
||||
[Address(RVA = "0x22E0940", Offset = "0x22DF940", VA = "0x1822E0940")]
|
||||
public OcbBlockCipher(IBlockCipher hashCipher, IBlockCipher mainCipher)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B880)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.OcbBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_68:
|
||||
stloc:ArgumentException(var_5_72, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("'hashCipher' and 'mainCipher' must be the same algorithm")))
|
||||
}
|
||||
|
||||
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: 0x0600B881 RID: 47233 RVA: 0x0027F828 File Offset: 0x0027DA28
|
||||
[Token(Token = "0x600B881")]
|
||||
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0", Slot = "17")]
|
||||
public virtual IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.mainCipher;
|
||||
}
|
||||
|
||||
// Token: 0x17001D1F RID: 7455
|
||||
// (get) Token: 0x0600B882 RID: 47234 RVA: 0x0027F83C File Offset: 0x0027DA3C
|
||||
[Token(Token = "0x17001D1F")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B882")]
|
||||
[Address(RVA = "0x22E0BD0", Offset = "0x22DFBD0", VA = "0x1822E0BD0", Slot = "18")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.mainCipher;
|
||||
return 0 + "/OCB";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B883 RID: 47235 RVA: 0x0027F864 File Offset: 0x0027DA64
|
||||
[Token(Token = "0x600B883")]
|
||||
[Address(RVA = "0x22DF4E0", Offset = "0x22DE4E0", VA = "0x1822DF4E0", Slot = "19")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B883)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.OcbBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_1DF:
|
||||
stloc:ArgumentException(var_42_1E9, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("cannot change encrypting state without providing key.")))
|
||||
}
|
||||
|
||||
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: 0x0600B884 RID: 47236 RVA: 0x0027FA5C File Offset: 0x0027DC5C
|
||||
[Token(Token = "0x600B884")]
|
||||
[Address(RVA = "0x22E02E0", Offset = "0x22DF2E0", VA = "0x1822E02E0", Slot = "20")]
|
||||
protected virtual int ProcessNonce(byte[] N)
|
||||
{
|
||||
byte[] array = new byte[16];
|
||||
int length = N.Length;
|
||||
int num = 0;
|
||||
int num2 = array.Length;
|
||||
num2 -= length;
|
||||
int num3 = 0;
|
||||
Array.Copy(N, num3, array, num2, length);
|
||||
int num4 = this.macSize;
|
||||
array[0] = (byte)num4;
|
||||
byte b = array[1];
|
||||
array[1] = b;
|
||||
byte[] ktopInput = this.KtopInput;
|
||||
if (ktopInput == 0 || !Arrays.AreEqual(array, ktopInput))
|
||||
{
|
||||
byte[] array2 = new byte[16];
|
||||
IBlockCipher blockCipher = this.hashCipher;
|
||||
this.KtopInput = array;
|
||||
byte[] stretch = this.Stretch;
|
||||
int num5 = 0;
|
||||
int num6 = 0;
|
||||
ulong num7;
|
||||
Array.Copy(array2, num6, stretch, num5, (int)num7);
|
||||
int length2 = array2.Length;
|
||||
byte[] stretch2 = this.Stretch;
|
||||
num++;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B885 RID: 47237 RVA: 0x0027FB24 File Offset: 0x0027DD24
|
||||
[Token(Token = "0x600B885")]
|
||||
[Address(RVA = "0x8BB9C0", Offset = "0x8BA9C0", VA = "0x1808BB9C0", Slot = "21")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x0600B886 RID: 47238 RVA: 0x0027FB34 File Offset: 0x0027DD34
|
||||
[Token(Token = "0x600B886")]
|
||||
[Address(RVA = "0x22DF400", Offset = "0x22DE400", VA = "0x1822DF400", Slot = "22")]
|
||||
public virtual byte[] GetMac()
|
||||
{
|
||||
byte[] array = this.macBlock;
|
||||
if (array == 0)
|
||||
{
|
||||
}
|
||||
return Arrays.Clone(array);
|
||||
}
|
||||
|
||||
// Token: 0x0600B887 RID: 47239 RVA: 0x0027FB54 File Offset: 0x0027DD54
|
||||
[Token(Token = "0x600B887")]
|
||||
[Address(RVA = "0x22DF480", Offset = "0x22DE480", VA = "0x1822DF480", Slot = "23")]
|
||||
public virtual int GetOutputSize(int len)
|
||||
{
|
||||
int num = this.mainBlockPos;
|
||||
int num2 = this.macSize;
|
||||
num += len;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
return num2 + num;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return num - num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B888 RID: 47240 RVA: 0x0027FB90 File Offset: 0x0027DD90
|
||||
[Token(Token = "0x600B888")]
|
||||
[Address(RVA = "0x22DF4B0", Offset = "0x22DE4B0", VA = "0x1822DF4B0", Slot = "24")]
|
||||
public virtual int GetUpdateOutputSize(int len)
|
||||
{
|
||||
int num = this.mainBlockPos;
|
||||
num += len;
|
||||
int num2;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
num2 = this.macSize;
|
||||
num -= num2;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
return num - num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B889 RID: 47241 RVA: 0x0027FBCC File Offset: 0x0027DDCC
|
||||
[Token(Token = "0x600B889")]
|
||||
[Address(RVA = "0x22DFCF0", Offset = "0x22DECF0", VA = "0x1822DFCF0", Slot = "25")]
|
||||
public virtual void ProcessAadByte(byte input)
|
||||
{
|
||||
byte[] array = this.hashBlock;
|
||||
int num = this.hashBlockPos;
|
||||
int num2 = this.hashBlockPos;
|
||||
byte[] array2 = this.hashBlock;
|
||||
num2++;
|
||||
this.hashBlockPos = num2;
|
||||
if (num2 == array2.Length)
|
||||
{
|
||||
string algorithmName = ((IAeadBlockCipher)this).AlgorithmName;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B88A RID: 47242 RVA: 0x0027FC18 File Offset: 0x0027DE18
|
||||
[Token(Token = "0x600B88A")]
|
||||
[Address(RVA = "0x22DFD60", Offset = "0x22DED60", VA = "0x1822DFD60", Slot = "26")]
|
||||
public virtual void ProcessAadBytes(byte[] input, int off, int len)
|
||||
{
|
||||
if (len > 0)
|
||||
{
|
||||
byte[] array = this.hashBlock;
|
||||
int num = this.hashBlockPos;
|
||||
int num2 = this.hashBlockPos;
|
||||
byte[] array2 = this.hashBlock;
|
||||
num2++;
|
||||
this.hashBlockPos = num2;
|
||||
if (num2 == array2.Length)
|
||||
{
|
||||
}
|
||||
num2 = off - off;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B88B RID: 47243 RVA: 0x0027FC68 File Offset: 0x0027DE68
|
||||
[Token(Token = "0x600B88B")]
|
||||
[Address(RVA = "0x22DFE40", Offset = "0x22DEE40", VA = "0x1822DFE40", Slot = "27")]
|
||||
public virtual int ProcessByte(byte input, byte[] output, int outOff)
|
||||
{
|
||||
byte[] array = this.mainBlock;
|
||||
int num = this.mainBlockPos;
|
||||
int num2 = this.mainBlockPos;
|
||||
byte[] array2 = this.mainBlock;
|
||||
num2++;
|
||||
this.mainBlockPos = num2;
|
||||
if (num2 != array2.Length)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
this.ProcessHashBlock();
|
||||
return 16;
|
||||
}
|
||||
|
||||
// Token: 0x0600B88C RID: 47244 RVA: 0x0027FCB8 File Offset: 0x0027DEB8
|
||||
[Token(Token = "0x600B88C")]
|
||||
[Address(RVA = "0x22DFEC0", Offset = "0x22DEEC0", VA = "0x1822DFEC0", Slot = "28")]
|
||||
public virtual int ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff)
|
||||
{
|
||||
int num = 0;
|
||||
if (len > 0)
|
||||
{
|
||||
byte[] array = this.mainBlock;
|
||||
int num2 = this.mainBlockPos;
|
||||
int num3 = this.mainBlockPos;
|
||||
byte[] array2 = this.mainBlock;
|
||||
num3++;
|
||||
this.mainBlockPos = num3;
|
||||
if (num3 == array2.Length)
|
||||
{
|
||||
this.ProcessHashBlock();
|
||||
num += 16;
|
||||
}
|
||||
num3 = inOff - inOff;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
// Token: 0x0600B88D RID: 47245 RVA: 0x0027FD20 File Offset: 0x0027DF20
|
||||
[Token(Token = "0x600B88D")]
|
||||
[Address(RVA = "0x22DEC80", Offset = "0x22DDC80", VA = "0x1822DEC80", Slot = "29")]
|
||||
public virtual int DoFinal(byte[] output, int outOff)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B88D)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.OcbBlockCipher::DoFinal(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_205:
|
||||
stloc:InvalidCipherTextException(var_40_20F, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in OCB failed")))
|
||||
}
|
||||
|
||||
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: 0x0600B88E RID: 47246 RVA: 0x0027FF40 File Offset: 0x0027E140
|
||||
[Token(Token = "0x600B88E")]
|
||||
[Address(RVA = "0x22E0690", Offset = "0x22DF690", VA = "0x1822E0690", Slot = "30")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
string algorithmName = ((IAeadBlockCipher)this).AlgorithmName;
|
||||
}
|
||||
|
||||
// Token: 0x0600B88F RID: 47247 RVA: 0x0027FF54 File Offset: 0x0027E154
|
||||
[Token(Token = "0x600B88F")]
|
||||
[Address(RVA = "0x22DEC60", Offset = "0x22DDC60", VA = "0x1822DEC60", Slot = "31")]
|
||||
protected virtual void Clear(byte[] bs)
|
||||
{
|
||||
if (bs != 0)
|
||||
{
|
||||
int length = bs.Length;
|
||||
int num = 0;
|
||||
Array.Clear(bs, num, length);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B890 RID: 47248 RVA: 0x0027FF78 File Offset: 0x0027E178
|
||||
[Token(Token = "0x600B890")]
|
||||
[Address(RVA = "0x22DF100", Offset = "0x22DE100", VA = "0x1822DF100", Slot = "32")]
|
||||
protected virtual byte[] GetLSub(int n)
|
||||
{
|
||||
int num;
|
||||
int num4;
|
||||
do
|
||||
{
|
||||
IList l = this.L;
|
||||
num = 0;
|
||||
num += num;
|
||||
num++;
|
||||
IList l2 = this.L;
|
||||
uint num2;
|
||||
if (num < (int)num2)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
uint num3;
|
||||
if (num < (int)num3)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
num4 = 0;
|
||||
if (num == 0)
|
||||
{
|
||||
num++;
|
||||
num += 19;
|
||||
num++;
|
||||
num += 19;
|
||||
num += 19;
|
||||
}
|
||||
}
|
||||
while (num == 0);
|
||||
if (num < num4)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
IList l3 = this.L;
|
||||
byte[] array;
|
||||
array += array;
|
||||
byte b;
|
||||
return b;
|
||||
}
|
||||
|
||||
// Token: 0x0600B891 RID: 47249 RVA: 0x0027FFF8 File Offset: 0x0027E1F8
|
||||
[Token(Token = "0x600B891")]
|
||||
[Address(RVA = "0x22DFFC0", Offset = "0x22DEFC0", VA = "0x1822DFFC0", Slot = "33")]
|
||||
protected virtual void ProcessHashBlock()
|
||||
{
|
||||
long num = this.hashBlockCount;
|
||||
this.hashBlockCount = num;
|
||||
int num2 = 0;
|
||||
num2++;
|
||||
this.hashBlockPos = (int)((ulong)0L);
|
||||
}
|
||||
|
||||
// Token: 0x0600B892 RID: 47250 RVA: 0x00280024 File Offset: 0x0027E224
|
||||
[Token(Token = "0x600B892")]
|
||||
[Address(RVA = "0x22E0030", Offset = "0x22DF030", VA = "0x1822E0030", Slot = "34")]
|
||||
protected virtual void ProcessMainBlock(byte[] output, int outOff)
|
||||
{
|
||||
int num = 0;
|
||||
Check.DataLength(output, outOff, 16, "Output buffer too short");
|
||||
if ((this.forEncryption ? 1 : 0) != num)
|
||||
{
|
||||
byte[] array = this.mainBlock;
|
||||
OcbBlockCipher.Xor(this.Checksum, array);
|
||||
this.mainBlockPos = num;
|
||||
}
|
||||
long num2 = this.mainBlockCount;
|
||||
byte[] offsetMAIN = this.OffsetMAIN;
|
||||
this.mainBlockCount = num2;
|
||||
if ((this.forEncryption ? 1 : 0) != num)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
byte[] array2 = this.mainBlock;
|
||||
byte[] offsetMAIN2 = this.OffsetMAIN;
|
||||
IBlockCipher blockCipher = this.mainCipher;
|
||||
byte[] array3 = this.mainBlock;
|
||||
byte[] array4 = this.mainBlock;
|
||||
byte[] offsetMAIN3 = this.OffsetMAIN;
|
||||
byte[] array5 = this.mainBlock;
|
||||
int num3 = 0;
|
||||
ulong num4;
|
||||
Array.Copy(array5, num3, output, outOff, (int)num4);
|
||||
if ((this.forEncryption ? 1 : 0) == num)
|
||||
{
|
||||
byte[] array6 = this.mainBlock;
|
||||
OcbBlockCipher.Xor(this.Checksum, array6);
|
||||
byte[] array7 = this.mainBlock;
|
||||
int num5 = 0;
|
||||
int num6 = this.macSize;
|
||||
Array.Copy(array7, 16, array7, num5, num6);
|
||||
int num7 = this.macSize;
|
||||
this.mainBlockPos = num7;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B893 RID: 47251 RVA: 0x00280124 File Offset: 0x0027E324
|
||||
[Token(Token = "0x600B893")]
|
||||
[Address(RVA = "0x22E0520", Offset = "0x22DF520", VA = "0x1822E0520", Slot = "35")]
|
||||
protected virtual void Reset(bool clearMac)
|
||||
{
|
||||
IBlockCipher blockCipher = this.hashCipher;
|
||||
IBlockCipher blockCipher2 = this.mainCipher;
|
||||
this.Reset();
|
||||
this.Reset();
|
||||
int num = 0;
|
||||
this.hashBlockPos = num;
|
||||
this.hashBlockCount = (long)num;
|
||||
this.mainBlockCount = (long)num;
|
||||
this.Reset();
|
||||
this.Reset();
|
||||
byte[] offsetMAIN = this.OffsetMAIN;
|
||||
int num2 = 0;
|
||||
byte[] offsetMAIN_ = this.OffsetMAIN_0;
|
||||
int num3 = 0;
|
||||
ulong num4;
|
||||
Array.Copy(offsetMAIN_, num3, offsetMAIN, num2, (int)num4);
|
||||
this.Reset();
|
||||
if (clearMac)
|
||||
{
|
||||
this.macBlock = num;
|
||||
}
|
||||
byte[] array = this.initialAssociatedText;
|
||||
if (array != 0)
|
||||
{
|
||||
this.ProcessAadByte(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B894 RID: 47252 RVA: 0x002801C0 File Offset: 0x0027E3C0
|
||||
[Token(Token = "0x600B894")]
|
||||
[Address(RVA = "0x22E0730", Offset = "0x22DF730", VA = "0x1822E0730", Slot = "36")]
|
||||
protected virtual void UpdateHASH(byte[] LSub)
|
||||
{
|
||||
byte[] offsetHASH = this.OffsetHASH;
|
||||
byte[] offsetHASH2 = this.OffsetHASH;
|
||||
byte[] array = this.hashBlock;
|
||||
IBlockCipher blockCipher = this.hashCipher;
|
||||
byte[] array2 = this.hashBlock;
|
||||
byte[] sum = this.Sum;
|
||||
byte[] array3 = this.hashBlock;
|
||||
}
|
||||
|
||||
// Token: 0x0600B895 RID: 47253 RVA: 0x0028020C File Offset: 0x0027E40C
|
||||
[Token(Token = "0x600B895")]
|
||||
[Address(RVA = "0x22DFB60", Offset = "0x22DEB60", VA = "0x1822DFB60")]
|
||||
protected static byte[] OCB_double(byte[] block)
|
||||
{
|
||||
byte[] array = new byte[16];
|
||||
byte b;
|
||||
b += b;
|
||||
uint num;
|
||||
num -= (uint)b;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B896 RID: 47254 RVA: 0x00280230 File Offset: 0x0027E430
|
||||
[Token(Token = "0x600B896")]
|
||||
[Address(RVA = "0x22DFC50", Offset = "0x22DEC50", VA = "0x1822DFC50")]
|
||||
protected static void OCB_extend(byte[] block, int pos)
|
||||
{
|
||||
int num = pos + 1;
|
||||
if (num < 16)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B897 RID: 47255 RVA: 0x00280250 File Offset: 0x0027E450
|
||||
[Token(Token = "0x600B897")]
|
||||
[Address(RVA = "0x22DFCC0", Offset = "0x22DECC0", VA = "0x1822DFCC0")]
|
||||
protected static int OCB_ntz(long x)
|
||||
{
|
||||
int num = 0;
|
||||
return num + 1;
|
||||
}
|
||||
|
||||
// Token: 0x0600B898 RID: 47256 RVA: 0x00280268 File Offset: 0x0027E468
|
||||
[Token(Token = "0x600B898")]
|
||||
[Address(RVA = "0x22E06B0", Offset = "0x22DF6B0", VA = "0x1822E06B0")]
|
||||
protected static int ShiftLeft(byte[] block, byte[] output)
|
||||
{
|
||||
byte b;
|
||||
b += b;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B899 RID: 47257 RVA: 0x00280280 File Offset: 0x0027E480
|
||||
[Token(Token = "0x600B899")]
|
||||
[Address(RVA = "0x22E08D0", Offset = "0x22DF8D0", VA = "0x1822E08D0")]
|
||||
protected static void Xor(byte[] block, byte[] val)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400746B RID: 29803
|
||||
[Token(Token = "0x400746B")]
|
||||
private const int BLOCK_SIZE = 16;
|
||||
|
||||
// Token: 0x0400746C RID: 29804
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400746C")]
|
||||
private readonly IBlockCipher hashCipher;
|
||||
|
||||
// Token: 0x0400746D RID: 29805
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400746D")]
|
||||
private readonly IBlockCipher mainCipher;
|
||||
|
||||
// Token: 0x0400746E RID: 29806
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400746E")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x0400746F RID: 29807
|
||||
[FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x400746F")]
|
||||
private int macSize;
|
||||
|
||||
// Token: 0x04007470 RID: 29808
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007470")]
|
||||
private byte[] initialAssociatedText;
|
||||
|
||||
// Token: 0x04007471 RID: 29809
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007471")]
|
||||
private IList L;
|
||||
|
||||
// Token: 0x04007472 RID: 29810
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x4007472")]
|
||||
private byte[] L_Asterisk;
|
||||
|
||||
// Token: 0x04007473 RID: 29811
|
||||
[FieldOffset(Offset = "0x40")]
|
||||
[Token(Token = "0x4007473")]
|
||||
private byte[] L_Dollar;
|
||||
|
||||
// Token: 0x04007474 RID: 29812
|
||||
[FieldOffset(Offset = "0x48")]
|
||||
[Token(Token = "0x4007474")]
|
||||
private byte[] KtopInput;
|
||||
|
||||
// Token: 0x04007475 RID: 29813
|
||||
[FieldOffset(Offset = "0x50")]
|
||||
[Token(Token = "0x4007475")]
|
||||
private byte[] Stretch;
|
||||
|
||||
// Token: 0x04007476 RID: 29814
|
||||
[FieldOffset(Offset = "0x58")]
|
||||
[Token(Token = "0x4007476")]
|
||||
private byte[] OffsetMAIN_0;
|
||||
|
||||
// Token: 0x04007477 RID: 29815
|
||||
[FieldOffset(Offset = "0x60")]
|
||||
[Token(Token = "0x4007477")]
|
||||
private byte[] hashBlock;
|
||||
|
||||
// Token: 0x04007478 RID: 29816
|
||||
[FieldOffset(Offset = "0x68")]
|
||||
[Token(Token = "0x4007478")]
|
||||
private byte[] mainBlock;
|
||||
|
||||
// Token: 0x04007479 RID: 29817
|
||||
[FieldOffset(Offset = "0x70")]
|
||||
[Token(Token = "0x4007479")]
|
||||
private int hashBlockPos;
|
||||
|
||||
// Token: 0x0400747A RID: 29818
|
||||
[FieldOffset(Offset = "0x74")]
|
||||
[Token(Token = "0x400747A")]
|
||||
private int mainBlockPos;
|
||||
|
||||
// Token: 0x0400747B RID: 29819
|
||||
[FieldOffset(Offset = "0x78")]
|
||||
[Token(Token = "0x400747B")]
|
||||
private long hashBlockCount;
|
||||
|
||||
// Token: 0x0400747C RID: 29820
|
||||
[FieldOffset(Offset = "0x80")]
|
||||
[Token(Token = "0x400747C")]
|
||||
private long mainBlockCount;
|
||||
|
||||
// Token: 0x0400747D RID: 29821
|
||||
[FieldOffset(Offset = "0x88")]
|
||||
[Token(Token = "0x400747D")]
|
||||
private byte[] OffsetHASH;
|
||||
|
||||
// Token: 0x0400747E RID: 29822
|
||||
[FieldOffset(Offset = "0x90")]
|
||||
[Token(Token = "0x400747E")]
|
||||
private byte[] Sum;
|
||||
|
||||
// Token: 0x0400747F RID: 29823
|
||||
[FieldOffset(Offset = "0x98")]
|
||||
[Token(Token = "0x400747F")]
|
||||
private byte[] OffsetMAIN;
|
||||
|
||||
// Token: 0x04007480 RID: 29824
|
||||
[FieldOffset(Offset = "0xA0")]
|
||||
[Token(Token = "0x4007480")]
|
||||
private byte[] Checksum;
|
||||
|
||||
// Token: 0x04007481 RID: 29825
|
||||
[FieldOffset(Offset = "0xA8")]
|
||||
[Token(Token = "0x4007481")]
|
||||
private byte[] macBlock;
|
||||
}
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D1E RID: 7454
|
||||
[Token(Token = "0x2001D1E")]
|
||||
public class OfbBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B89A RID: 47258 RVA: 0x00280294 File Offset: 0x0027E494
|
||||
[Token(Token = "0x600B89A")]
|
||||
[Address(RVA = "0x22E10D0", Offset = "0x22E00D0", VA = "0x1822E10D0")]
|
||||
public OfbBlockCipher(IBlockCipher cipher, int blockSize)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
this.blockSize = blockSize;
|
||||
byte[] array = new byte[blockSize];
|
||||
this.IV = array;
|
||||
byte[] array2 = new byte[array];
|
||||
this.ofbV = array2;
|
||||
byte[] array3 = new byte[array2];
|
||||
this.ofbOutV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B89B RID: 47259 RVA: 0x002802E8 File Offset: 0x0027E4E8
|
||||
[Token(Token = "0x600B89B")]
|
||||
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B89C RID: 47260 RVA: 0x002802FC File Offset: 0x0027E4FC
|
||||
[Token(Token = "0x600B89C")]
|
||||
[Address(RVA = "0x22E0C30", Offset = "0x22DFC30", VA = "0x1822E0C30", 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 length2 = iv.Length;
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
Array.Copy(array, num, iv, num2, length2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
byte[] iv2 = this.IV;
|
||||
int length3 = iv2.Length;
|
||||
int num3 = 0;
|
||||
byte[] array2 = this.ofbV;
|
||||
int num4 = 0;
|
||||
Array.Copy(iv2, num4, array2, num3, length3);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
if (parameters != 0)
|
||||
{
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D20 RID: 7456
|
||||
// (get) Token: 0x0600B89D RID: 47261 RVA: 0x002803B8 File Offset: 0x0027E5B8
|
||||
[Token(Token = "0x17001D20")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B89D")]
|
||||
[Address(RVA = "0x22E11B0", Offset = "0x22E01B0", VA = "0x1822E11B0", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
int num = this.blockSize;
|
||||
string text;
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D21 RID: 7457
|
||||
// (get) Token: 0x0600B89E RID: 47262 RVA: 0x002803DC File Offset: 0x0027E5DC
|
||||
[Token(Token = "0x17001D21")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B89E")]
|
||||
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B89F RID: 47263 RVA: 0x002803EC File Offset: 0x0027E5EC
|
||||
[Token(Token = "0x600B89F")]
|
||||
[Address(RVA = "0x471180", Offset = "0x470180", VA = "0x180471180", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8A0 RID: 47264 RVA: 0x00280400 File Offset: 0x0027E600
|
||||
[Token(Token = "0x600B8A0")]
|
||||
[Address(RVA = "0x22E0E50", Offset = "0x22DFE50", VA = "0x1822E0E50", Slot = "8")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array = this.ofbOutV;
|
||||
int num = this.blockSize;
|
||||
if (num > 0)
|
||||
{
|
||||
byte[] array2 = this.ofbOutV;
|
||||
int num2 = this.blockSize;
|
||||
}
|
||||
byte[] array3 = this.ofbV;
|
||||
int num3 = array3.Length;
|
||||
int num4 = 0;
|
||||
num3 -= num;
|
||||
Array.Copy(array3, num, array3, num4, num3);
|
||||
byte[] array4 = this.ofbV;
|
||||
int num5 = this.blockSize;
|
||||
int num6 = 0;
|
||||
int num7 = array4.Length;
|
||||
byte[] array5 = this.ofbOutV;
|
||||
num7 -= num5;
|
||||
Array.Copy(array5, num6, array4, num7, num5);
|
||||
return this.blockSize;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8A1 RID: 47265 RVA: 0x002804A8 File Offset: 0x0027E6A8
|
||||
[Token(Token = "0x600B8A1")]
|
||||
[Address(RVA = "0x22E1060", Offset = "0x22E0060", VA = "0x1822E1060", Slot = "9")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] iv = this.IV;
|
||||
int length = iv.Length;
|
||||
int num = 0;
|
||||
byte[] array = this.ofbV;
|
||||
int num2 = 0;
|
||||
Array.Copy(iv, num2, array, num, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04007482 RID: 29826
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007482")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x04007483 RID: 29827
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007483")]
|
||||
private byte[] ofbV;
|
||||
|
||||
// Token: 0x04007484 RID: 29828
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007484")]
|
||||
private byte[] ofbOutV;
|
||||
|
||||
// Token: 0x04007485 RID: 29829
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007485")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x04007486 RID: 29830
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007486")]
|
||||
private readonly IBlockCipher cipher;
|
||||
}
|
||||
}
|
||||
+339
@@ -0,0 +1,339 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D1F RID: 7455
|
||||
[Token(Token = "0x2001D1F")]
|
||||
public class OpenPgpCfbBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B8A2 RID: 47266 RVA: 0x002804E8 File Offset: 0x0027E6E8
|
||||
[Token(Token = "0x600B8A2")]
|
||||
[Address(RVA = "0x22E2390", Offset = "0x22E1390", VA = "0x1822E2390")]
|
||||
public OpenPgpCfbBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[0];
|
||||
int num = this.blockSize;
|
||||
this.IV = array;
|
||||
byte[] array2 = new byte[num];
|
||||
int num2 = this.blockSize;
|
||||
this.FR = array2;
|
||||
byte[] array3 = new byte[num2];
|
||||
this.FRE = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8A3 RID: 47267 RVA: 0x00280544 File Offset: 0x0027E744
|
||||
[Token(Token = "0x600B8A3")]
|
||||
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
|
||||
public IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x17001D22 RID: 7458
|
||||
// (get) Token: 0x0600B8A4 RID: 47268 RVA: 0x00280558 File Offset: 0x0027E758
|
||||
[Token(Token = "0x17001D22")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B8A4")]
|
||||
[Address(RVA = "0x22E2430", Offset = "0x22E1430", VA = "0x1822E2430", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/OpenPGPCFB";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D23 RID: 7459
|
||||
// (get) Token: 0x0600B8A5 RID: 47269 RVA: 0x00280580 File Offset: 0x0027E780
|
||||
[Token(Token = "0x17001D23")]
|
||||
public bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B8A5")]
|
||||
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "7")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B8A6 RID: 47270 RVA: 0x00280590 File Offset: 0x0027E790
|
||||
[Token(Token = "0x600B8A6")]
|
||||
[Address(RVA = "0x22E2060", Offset = "0x22E1060", VA = "0x1822E2060", Slot = "6")]
|
||||
public int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B8A7 RID: 47271 RVA: 0x002805AC File Offset: 0x0027E7AC
|
||||
[Token(Token = "0x600B8A7")]
|
||||
[Address(RVA = "0x22E22E0", Offset = "0x22E12E0", VA = "0x1822E22E0", Slot = "8")]
|
||||
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
if (this.forEncryption)
|
||||
{
|
||||
int num;
|
||||
return num;
|
||||
}
|
||||
int num2;
|
||||
return num2;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8A8 RID: 47272 RVA: 0x002805C8 File Offset: 0x0027E7C8
|
||||
[Token(Token = "0x600B8A8")]
|
||||
[Address(RVA = "0x22E2310", Offset = "0x22E1310", VA = "0x1822E2310", Slot = "9")]
|
||||
public void Reset()
|
||||
{
|
||||
byte[] fr = this.FR;
|
||||
int num = 0;
|
||||
this.count = num;
|
||||
byte[] iv = this.IV;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
int length = fr.Length;
|
||||
Array.Copy(iv, num3, fr, num2, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B8A9 RID: 47273 RVA: 0x00280614 File Offset: 0x0027E814
|
||||
[Token(Token = "0x600B8A9")]
|
||||
[Address(RVA = "0x22E20B0", Offset = "0x22E10B0", VA = "0x1822E20B0", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
this.forEncryption = forEncryption;
|
||||
if (parameters == 0 || parameters == 0)
|
||||
{
|
||||
goto IL_46;
|
||||
}
|
||||
}
|
||||
while (parameters == 0);
|
||||
byte[] iv = this.IV;
|
||||
byte[] array;
|
||||
int length = array.Length;
|
||||
int length2 = iv.Length;
|
||||
int num2 = 0;
|
||||
int num3 = 0;
|
||||
Array.Copy(array, num2, iv, num3, length2);
|
||||
IL_46:
|
||||
byte[] fr = this.FR;
|
||||
this.count = num;
|
||||
int length3 = fr.Length;
|
||||
int num4 = 0;
|
||||
byte[] iv2 = this.IV;
|
||||
int num5 = 0;
|
||||
Array.Copy(iv2, num5, fr, num4, length3);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8AA RID: 47274 RVA: 0x002806B4 File Offset: 0x0027E8B4
|
||||
[Token(Token = "0x600B8AA")]
|
||||
[Address(RVA = "0x22E2020", Offset = "0x22E1020", VA = "0x1822E2020")]
|
||||
private byte EncryptByte(byte data, int blockOff)
|
||||
{
|
||||
byte[] fre = this.FRE;
|
||||
byte b;
|
||||
return b;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8AB RID: 47275 RVA: 0x002806D0 File Offset: 0x0027E8D0
|
||||
[Token(Token = "0x600B8AB")]
|
||||
[Address(RVA = "0x22E1970", Offset = "0x22E0970", VA = "0x1822E1970")]
|
||||
private int EncryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num;
|
||||
int num2;
|
||||
byte[] fre5;
|
||||
for (;;)
|
||||
{
|
||||
num = this.blockSize;
|
||||
int length = input.Length;
|
||||
int length2 = outBytes.Length;
|
||||
num2 = this.count;
|
||||
if (num2 != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] fre = this.FRE;
|
||||
int num3 = 0;
|
||||
if (this.blockSize > 0)
|
||||
{
|
||||
byte[] fr = this.FR;
|
||||
byte[] fre2 = this.FRE;
|
||||
byte b = fre[input];
|
||||
num3++;
|
||||
int num4 = this.blockSize;
|
||||
byte[] fr2 = this.FR;
|
||||
byte[] fre3 = this.FRE;
|
||||
num4 += -2;
|
||||
byte b2;
|
||||
fr2[0] = b2;
|
||||
int num5 = inOff + 1;
|
||||
byte[] fr3 = this.FR;
|
||||
byte[] fre4 = this.FRE;
|
||||
int num6 = this.blockSize;
|
||||
byte b3;
|
||||
fr3[0] = b3;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
fre5 = this.FRE;
|
||||
if (this.blockSize > 2)
|
||||
{
|
||||
goto Block_4;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (num2 == num)
|
||||
{
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte[] fre6 = this.FRE;
|
||||
byte[] fre7 = this.FRE;
|
||||
int num7 = inOff + 1;
|
||||
byte[] fre8 = this.FRE;
|
||||
int num8 = this.blockSize;
|
||||
int num9 = 0;
|
||||
byte[] fr4 = this.FR;
|
||||
Array.Copy(fr4, 2, fr4, num9, num8);
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
byte[] fre9 = this.FRE;
|
||||
if (this.blockSize > 2)
|
||||
{
|
||||
byte[] fr5 = this.FR;
|
||||
byte[] fre10 = this.FRE;
|
||||
byte b4;
|
||||
fre9[0] = b4;
|
||||
int num10 = this.blockSize;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
Block_4:
|
||||
byte[] fr6 = this.FR;
|
||||
byte[] fre11 = this.FRE;
|
||||
byte b5;
|
||||
fre5[0] = b5;
|
||||
int num11 = this.blockSize;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B8AC RID: 47276 RVA: 0x00280864 File Offset: 0x0027EA64
|
||||
[Token(Token = "0x600B8AC")]
|
||||
[Address(RVA = "0x22E1240", Offset = "0x22E0240", VA = "0x1822E1240")]
|
||||
private int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
|
||||
{
|
||||
int num;
|
||||
int num2;
|
||||
byte[] fre5;
|
||||
for (;;)
|
||||
{
|
||||
num = this.blockSize;
|
||||
int length = input.Length;
|
||||
num2 = this.count;
|
||||
if (num2 != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] fre = this.FRE;
|
||||
int num3 = 0;
|
||||
if (this.blockSize > 0)
|
||||
{
|
||||
byte[] fr = this.FR;
|
||||
byte[] fre2 = this.FRE;
|
||||
num3++;
|
||||
int num4 = this.blockSize;
|
||||
byte[] fr2 = this.FR;
|
||||
byte[] fre3 = this.FRE;
|
||||
int num5 = this.blockSize;
|
||||
int num6 = inOff + 1;
|
||||
byte[] fr3 = this.FR;
|
||||
int num7 = this.blockSize;
|
||||
byte[] fre4 = this.FRE;
|
||||
int num8 = this.blockSize;
|
||||
IBlockCipher blockCipher2 = this.cipher;
|
||||
fre5 = this.FRE;
|
||||
if (this.blockSize > 2)
|
||||
{
|
||||
goto Block_4;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (num2 == num)
|
||||
{
|
||||
IBlockCipher blockCipher3 = this.cipher;
|
||||
byte[] fre6 = this.FRE;
|
||||
int length2 = input.Length;
|
||||
int num9 = inOff + 1;
|
||||
byte[] fre7 = this.FRE;
|
||||
byte[] fre8 = this.FRE;
|
||||
int num10 = 0;
|
||||
int num11 = this.blockSize;
|
||||
byte[] fr4 = this.FR;
|
||||
Array.Copy(fr4, 2, fr4, num10, num11);
|
||||
byte[] fr5 = this.FR;
|
||||
int num12 = this.blockSize;
|
||||
byte[] fr6 = this.FR;
|
||||
int num13 = this.blockSize;
|
||||
IBlockCipher blockCipher4 = this.cipher;
|
||||
byte[] fre9 = this.FRE;
|
||||
if (this.blockSize > 2)
|
||||
{
|
||||
byte[] fr7 = this.FR;
|
||||
byte b = fre9[input];
|
||||
fre9[0] = b;
|
||||
byte[] fre10 = this.FRE;
|
||||
int num14 = this.blockSize;
|
||||
}
|
||||
}
|
||||
return num;
|
||||
Block_4:
|
||||
byte[] fr8 = this.FR;
|
||||
byte b2 = fre5[input];
|
||||
fre5[0] = b2;
|
||||
byte[] fre11 = this.FRE;
|
||||
int num15 = this.blockSize;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x04007487 RID: 29831
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007487")]
|
||||
private byte[] IV;
|
||||
|
||||
// Token: 0x04007488 RID: 29832
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007488")]
|
||||
private byte[] FR;
|
||||
|
||||
// Token: 0x04007489 RID: 29833
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007489")]
|
||||
private byte[] FRE;
|
||||
|
||||
// Token: 0x0400748A RID: 29834
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400748A")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x0400748B RID: 29835
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400748B")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x0400748C RID: 29836
|
||||
[FieldOffset(Offset = "0x34")]
|
||||
[Token(Token = "0x400748C")]
|
||||
private int count;
|
||||
|
||||
// Token: 0x0400748D RID: 29837
|
||||
[FieldOffset(Offset = "0x38")]
|
||||
[Token(Token = "0x400748D")]
|
||||
private bool forEncryption;
|
||||
}
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
||||
{
|
||||
// Token: 0x02001D20 RID: 7456
|
||||
[Token(Token = "0x2001D20")]
|
||||
public class SicBlockCipher : IBlockCipher
|
||||
{
|
||||
// Token: 0x0600B8AD RID: 47277 RVA: 0x00280A18 File Offset: 0x0027EC18
|
||||
[Token(Token = "0x600B8AD")]
|
||||
[Address(RVA = "0x22E4FE0", Offset = "0x22E3FE0", VA = "0x1822E4FE0")]
|
||||
public SicBlockCipher(IBlockCipher cipher)
|
||||
{
|
||||
this.cipher = cipher;
|
||||
byte[] array = new byte[0];
|
||||
int num = this.blockSize;
|
||||
this.counter = array;
|
||||
byte[] array2 = new byte[num];
|
||||
int num2 = this.blockSize;
|
||||
this.counterOut = array2;
|
||||
byte[] array3 = new byte[num2];
|
||||
this.IV = array3;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8AE RID: 47278 RVA: 0x00280A74 File Offset: 0x0027EC74
|
||||
[Token(Token = "0x600B8AE")]
|
||||
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530", Slot = "10")]
|
||||
public virtual IBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.cipher;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8AF RID: 47279 RVA: 0x00280A88 File Offset: 0x0027EC88
|
||||
[Token(Token = "0x600B8AF")]
|
||||
[Address(RVA = "0x22E4B10", Offset = "0x22E3B10", VA = "0x1822E4B10", Slot = "11")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B8AF)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.SicBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_5C:
|
||||
stloc:ArgumentException(var_10_6B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CTR/SIC mode requires ParametersWithIV"), 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.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: 0x17001D24 RID: 7460
|
||||
// (get) Token: 0x0600B8B0 RID: 47280 RVA: 0x00280B04 File Offset: 0x0027ED04
|
||||
[Token(Token = "0x17001D24")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B8B0")]
|
||||
[Address(RVA = "0x22E5080", Offset = "0x22E4080", VA = "0x1822E5080", Slot = "12")]
|
||||
get
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
return 0 + "/SIC";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001D25 RID: 7461
|
||||
// (get) Token: 0x0600B8B1 RID: 47281 RVA: 0x00280B2C File Offset: 0x0027ED2C
|
||||
[Token(Token = "0x17001D25")]
|
||||
public virtual bool IsPartialBlockOkay
|
||||
{
|
||||
[Token(Token = "0x600B8B1")]
|
||||
[Address(RVA = "0x4246A0", Offset = "0x4236A0", VA = "0x1804246A0", Slot = "13")]
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B8B2 RID: 47282 RVA: 0x00280B3C File Offset: 0x0027ED3C
|
||||
[Token(Token = "0x600B8B2")]
|
||||
[Address(RVA = "0x22E4AC0", Offset = "0x22E3AC0", VA = "0x1822E4AC0", Slot = "14")]
|
||||
public virtual int GetBlockSize()
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B8B3 RID: 47283 RVA: 0x00280B58 File Offset: 0x0027ED58
|
||||
[Token(Token = "0x600B8B3")]
|
||||
[Address(RVA = "0x22E4D90", Offset = "0x22E3D90", VA = "0x1822E4D90", Slot = "15")]
|
||||
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
|
||||
{
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
byte[] array = this.counterOut;
|
||||
int num = 0;
|
||||
byte[] array2 = this.counterOut;
|
||||
if (num < array2.Length)
|
||||
{
|
||||
byte[] array3 = this.counterOut;
|
||||
}
|
||||
int length = this.counter.Length;
|
||||
byte[] array4 = this.counter;
|
||||
while (length == array4.Length)
|
||||
{
|
||||
}
|
||||
return this.counter.Length;
|
||||
}
|
||||
|
||||
// Token: 0x0600B8B4 RID: 47284 RVA: 0x00280BC0 File Offset: 0x0027EDC0
|
||||
[Token(Token = "0x600B8B4")]
|
||||
[Address(RVA = "0x22E4F30", Offset = "0x22E3F30", VA = "0x1822E4F30", Slot = "16")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
byte[] array = this.counter;
|
||||
int num = 0;
|
||||
Arrays.Fill(array, (byte)num);
|
||||
byte[] iv = this.IV;
|
||||
int length = iv.Length;
|
||||
int num2 = 0;
|
||||
byte[] array2 = this.counter;
|
||||
int num3 = 0;
|
||||
Array.Copy(iv, num3, array2, num2, length);
|
||||
IBlockCipher blockCipher = this.cipher;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0400748E RID: 29838
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400748E")]
|
||||
private readonly IBlockCipher cipher;
|
||||
|
||||
// Token: 0x0400748F RID: 29839
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400748F")]
|
||||
private readonly int blockSize;
|
||||
|
||||
// Token: 0x04007490 RID: 29840
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007490")]
|
||||
private readonly byte[] counter;
|
||||
|
||||
// Token: 0x04007491 RID: 29841
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007491")]
|
||||
private readonly byte[] counterOut;
|
||||
|
||||
// Token: 0x04007492 RID: 29842
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x4007492")]
|
||||
private byte[] IV;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user