605 lines
28 KiB
C#
605 lines
28 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
|
|
{
|
|
// Token: 0x0200165E RID: 5726
|
|
[Token(Token = "0x200165E")]
|
|
[StructLayout(3)]
|
|
public class KCcmBlockCipher : IAeadBlockCipher
|
|
{
|
|
// Token: 0x060098B4 RID: 39092 RVA: 0x0021E2B8 File Offset: 0x0021C4B8
|
|
[Token(Token = "0x60098B4")]
|
|
[Address(RVA = "0x20F47F0", Offset = "0x20F31F0", VA = "0x1820F47F0")]
|
|
private void setNb(int Nb)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060098B4)
|
|
|
|
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: 0x060098B5 RID: 39093 RVA: 0x0021E2DC File Offset: 0x0021C4DC
|
|
[Token(Token = "0x60098B5")]
|
|
[Address(RVA = "0x20F4350", Offset = "0x20F2D50", VA = "0x1820F4350")]
|
|
public KCcmBlockCipher(IBlockCipher engine)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060098B6 RID: 39094 RVA: 0x0021E2EC File Offset: 0x0021C4EC
|
|
[Token(Token = "0x60098B6")]
|
|
[Address(RVA = "0x20F4360", Offset = "0x20F2D60", VA = "0x1820F4360")]
|
|
public KCcmBlockCipher(IBlockCipher engine, int Nb)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060098B6)
|
|
|
|
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: 0x060098B7 RID: 39095 RVA: 0x0021E3DC File Offset: 0x0021C5DC
|
|
[Token(Token = "0x60098B7")]
|
|
[Address(RVA = "0x20F2800", Offset = "0x20F1200", VA = "0x1820F2800", Slot = "17")]
|
|
public virtual void Init(bool forEncryption, ICipherParameters parameters)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060098B7)
|
|
|
|
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: 0x1700187E RID: 6270
|
|
// (get) Token: 0x060098B8 RID: 39096 RVA: 0x0021E4B0 File Offset: 0x0021C6B0
|
|
[Token(Token = "0x1700187E")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x60098B8")]
|
|
[Address(RVA = "0x20F4790", Offset = "0x20F3190", VA = "0x1820F4790", Slot = "18")]
|
|
get
|
|
{
|
|
IBlockCipher blockCipher = this.engine;
|
|
return 0 + "/KCCM";
|
|
}
|
|
}
|
|
|
|
// Token: 0x060098B9 RID: 39097 RVA: 0x0021E4D8 File Offset: 0x0021C6D8
|
|
[Token(Token = "0x60098B9")]
|
|
[Address(RVA = "0x20F2750", Offset = "0x20F1150", VA = "0x1820F2750", Slot = "19")]
|
|
public virtual int GetBlockSize()
|
|
{
|
|
IBlockCipher blockCipher = this.engine;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x060098BA RID: 39098 RVA: 0x0021E4F4 File Offset: 0x0021C6F4
|
|
[Token(Token = "0x60098BA")]
|
|
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "20")]
|
|
public virtual IBlockCipher GetUnderlyingCipher()
|
|
{
|
|
return this.engine;
|
|
}
|
|
|
|
// Token: 0x060098BB RID: 39099 RVA: 0x0021E508 File Offset: 0x0021C708
|
|
[Token(Token = "0x60098BB")]
|
|
[Address(RVA = "0x20F3330", Offset = "0x20F1D30", VA = "0x1820F3330", Slot = "21")]
|
|
public virtual void ProcessAadByte(byte input)
|
|
{
|
|
((IDisposable)this.associatedText).Dispose();
|
|
}
|
|
|
|
// Token: 0x060098BC RID: 39100 RVA: 0x0021E528 File Offset: 0x0021C728
|
|
[Token(Token = "0x60098BC")]
|
|
[Address(RVA = "0x20F3360", Offset = "0x20F1D60", VA = "0x1820F3360", Slot = "22")]
|
|
public virtual void ProcessAadBytes(byte[] input, int inOff, int len)
|
|
{
|
|
int num = this.associatedText.Read(input, inOff, len);
|
|
}
|
|
|
|
// Token: 0x060098BD RID: 39101 RVA: 0x0021E54C File Offset: 0x0021C74C
|
|
[Token(Token = "0x60098BD")]
|
|
[Address(RVA = "0x20F2C90", Offset = "0x20F1690", VA = "0x1820F2C90")]
|
|
private void ProcessAAD(byte[] assocText, int assocOff, int assocLen, int dataLen)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060098BD)
|
|
|
|
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: 0x060098BE RID: 39102 RVA: 0x0021E744 File Offset: 0x0021C944
|
|
[Token(Token = "0x60098BE")]
|
|
[Address(RVA = "0x20F3620", Offset = "0x20F2020", VA = "0x1820F3620", Slot = "23")]
|
|
public virtual int ProcessByte(byte input, byte[] output, int outOff)
|
|
{
|
|
MemoryStream memoryStream = this.data;
|
|
return 0;
|
|
}
|
|
|
|
// Token: 0x060098BF RID: 39103 RVA: 0x0021E760 File Offset: 0x0021C960
|
|
[Token(Token = "0x60098BF")]
|
|
[Address(RVA = "0x20F3650", Offset = "0x20F2050", VA = "0x1820F3650", 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: 0x060098C0 RID: 39104 RVA: 0x0021E790 File Offset: 0x0021C990
|
|
[Token(Token = "0x60098C0")]
|
|
[Address(RVA = "0x20F36F0", Offset = "0x20F20F0", VA = "0x1820F36F0")]
|
|
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: 0x060098C1 RID: 39105 RVA: 0x0021EA5C File Offset: 0x0021CC5C
|
|
[Token(Token = "0x60098C1")]
|
|
[Address(RVA = "0x20F3390", Offset = "0x20F1D90", VA = "0x1820F3390")]
|
|
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: 0x060098C2 RID: 39106 RVA: 0x0021EAE0 File Offset: 0x0021CCE0
|
|
[Token(Token = "0x60098C2")]
|
|
[Address(RVA = "0x20F2530", Offset = "0x20F0F30", VA = "0x1820F2530")]
|
|
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: 0x060098C3 RID: 39107 RVA: 0x0021EB30 File Offset: 0x0021CD30
|
|
[Token(Token = "0x60098C3")]
|
|
[Address(RVA = "0x20F26A0", Offset = "0x20F10A0", VA = "0x1820F26A0", Slot = "25")]
|
|
public virtual int DoFinal(byte[] output, int outOff)
|
|
{
|
|
MemoryStream memoryStream = this.data;
|
|
bool canWrite = this.data.CanWrite;
|
|
return outOff;
|
|
}
|
|
|
|
// Token: 0x060098C4 RID: 39108 RVA: 0x0021EB58 File Offset: 0x0021CD58
|
|
[Token(Token = "0x60098C4")]
|
|
[Address(RVA = "0x20F27A0", Offset = "0x20F11A0", VA = "0x1820F27A0", Slot = "26")]
|
|
public virtual byte[] GetMac()
|
|
{
|
|
return Arrays.Clone(this.mac);
|
|
}
|
|
|
|
// Token: 0x060098C5 RID: 39109 RVA: 0x0021EB70 File Offset: 0x0021CD70
|
|
[Token(Token = "0x60098C5")]
|
|
[Address(RVA = "0x4577C0", Offset = "0x4561C0", VA = "0x1804577C0", Slot = "27")]
|
|
public virtual int GetUpdateOutputSize(int len)
|
|
{
|
|
return len;
|
|
}
|
|
|
|
// Token: 0x060098C6 RID: 39110 RVA: 0x0021EB80 File Offset: 0x0021CD80
|
|
[Token(Token = "0x60098C6")]
|
|
[Address(RVA = "0x20E8770", Offset = "0x20E7170", VA = "0x1820E8770", Slot = "28")]
|
|
public virtual int GetOutputSize(int len)
|
|
{
|
|
int num = this.macSize;
|
|
return num + len;
|
|
}
|
|
|
|
// Token: 0x060098C7 RID: 39111 RVA: 0x0021EB9C File Offset: 0x0021CD9C
|
|
[Token(Token = "0x60098C7")]
|
|
[Address(RVA = "0x20F41B0", Offset = "0x20F2BB0", VA = "0x1820F41B0", 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: 0x060098C8 RID: 39112 RVA: 0x0021EC24 File Offset: 0x0021CE24
|
|
[Token(Token = "0x60098C8")]
|
|
[Address(RVA = "0x20EBCA0", Offset = "0x20EA6A0", VA = "0x1820EBCA0")]
|
|
private void intToBytes(int num, byte[] outBytes, int outOff)
|
|
{
|
|
int num2 = outOff + 1;
|
|
}
|
|
|
|
// Token: 0x060098C9 RID: 39113 RVA: 0x0021EC3C File Offset: 0x0021CE3C
|
|
[Token(Token = "0x60098C9")]
|
|
[Address(RVA = "0x20F45B0", Offset = "0x20F2FB0", VA = "0x1820F45B0")]
|
|
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: 0x04006456 RID: 25686
|
|
[Token(Token = "0x4006456")]
|
|
private static readonly int BYTES_IN_INT;
|
|
|
|
// Token: 0x04006457 RID: 25687
|
|
[Token(Token = "0x4006457")]
|
|
private static readonly int BITS_IN_BYTE;
|
|
|
|
// Token: 0x04006458 RID: 25688
|
|
[Token(Token = "0x4006458")]
|
|
private static readonly int MAX_MAC_BIT_LENGTH;
|
|
|
|
// Token: 0x04006459 RID: 25689
|
|
[Token(Token = "0x4006459")]
|
|
private static readonly int MIN_MAC_BIT_LENGTH;
|
|
|
|
// Token: 0x0400645A RID: 25690
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400645A")]
|
|
private IBlockCipher engine;
|
|
|
|
// Token: 0x0400645B RID: 25691
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400645B")]
|
|
private int macSize;
|
|
|
|
// Token: 0x0400645C RID: 25692
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x1C")]
|
|
[Token(Token = "0x400645C")]
|
|
private bool forEncryption;
|
|
|
|
// Token: 0x0400645D RID: 25693
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400645D")]
|
|
private byte[] initialAssociatedText;
|
|
|
|
// Token: 0x0400645E RID: 25694
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400645E")]
|
|
private byte[] mac;
|
|
|
|
// Token: 0x0400645F RID: 25695
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x400645F")]
|
|
private byte[] macBlock;
|
|
|
|
// Token: 0x04006460 RID: 25696
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4006460")]
|
|
private byte[] nonce;
|
|
|
|
// Token: 0x04006461 RID: 25697
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4006461")]
|
|
private byte[] G1;
|
|
|
|
// Token: 0x04006462 RID: 25698
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x4006462")]
|
|
private byte[] buffer;
|
|
|
|
// Token: 0x04006463 RID: 25699
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4006463")]
|
|
private byte[] s;
|
|
|
|
// Token: 0x04006464 RID: 25700
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
|
|
[Token(Token = "0x4006464")]
|
|
private byte[] counter;
|
|
|
|
// Token: 0x04006465 RID: 25701
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
|
|
[Token(Token = "0x4006465")]
|
|
private readonly MemoryStream associatedText;
|
|
|
|
// Token: 0x04006466 RID: 25702
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
|
|
[Token(Token = "0x4006466")]
|
|
private readonly MemoryStream data;
|
|
|
|
// Token: 0x04006467 RID: 25703
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
|
|
[Token(Token = "0x4006467")]
|
|
private int Nb_;
|
|
}
|
|
}
|