Files
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

165 lines
7.3 KiB
C#

using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001C40 RID: 7232
[Token(Token = "0x2001C40")]
public class SicBlockCipher : IBlockCipher
{
// Token: 0x0600B4DF RID: 46303 RVA: 0x0027787C File Offset: 0x00275A7C
[Token(Token = "0x600B4DF")]
[Address(RVA = "0x1812F40", Offset = "0x1811D40", VA = "0x181812F40")]
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: 0x0600B4E0 RID: 46304 RVA: 0x002778D8 File Offset: 0x00275AD8
[Token(Token = "0x600B4E0")]
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "10")]
public virtual IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x0600B4E1 RID: 46305 RVA: 0x002778EC File Offset: 0x00275AEC
[Token(Token = "0x600B4E1")]
[Address(RVA = "0x1812A70", Offset = "0x1811870", VA = "0x181812A70", Slot = "11")]
public virtual void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (0600B4E1)
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 1660
*/;
}
// Token: 0x17001C87 RID: 7303
// (get) Token: 0x0600B4E2 RID: 46306 RVA: 0x00277968 File Offset: 0x00275B68
[Token(Token = "0x17001C87")]
public virtual string AlgorithmName
{
[Token(Token = "0x600B4E2")]
[Address(RVA = "0x1812FE0", Offset = "0x1811DE0", VA = "0x181812FE0", Slot = "12")]
get
{
IBlockCipher blockCipher = this.cipher;
return 0 + "/SIC";
}
}
// Token: 0x17001C88 RID: 7304
// (get) Token: 0x0600B4E3 RID: 46307 RVA: 0x00277990 File Offset: 0x00275B90
[Token(Token = "0x17001C88")]
public virtual bool IsPartialBlockOkay
{
[Token(Token = "0x600B4E3")]
[Address(RVA = "0x460D40", Offset = "0x45FB40", VA = "0x180460D40", Slot = "13")]
get
{
return true;
}
}
// Token: 0x0600B4E4 RID: 46308 RVA: 0x002779A0 File Offset: 0x00275BA0
[Token(Token = "0x600B4E4")]
[Address(RVA = "0x1812A20", Offset = "0x1811820", VA = "0x181812A20", Slot = "14")]
public virtual int GetBlockSize()
{
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x0600B4E5 RID: 46309 RVA: 0x002779BC File Offset: 0x00275BBC
[Token(Token = "0x600B4E5")]
[Address(RVA = "0x1812CF0", Offset = "0x1811AF0", VA = "0x181812CF0", 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: 0x0600B4E6 RID: 46310 RVA: 0x00277A24 File Offset: 0x00275C24
[Token(Token = "0x600B4E6")]
[Address(RVA = "0x1812E90", Offset = "0x1811C90", VA = "0x181812E90", 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: 0x040072D5 RID: 29397
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x40072D5")]
private readonly IBlockCipher cipher;
// Token: 0x040072D6 RID: 29398
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40072D6")]
private readonly int blockSize;
// Token: 0x040072D7 RID: 29399
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40072D7")]
private readonly byte[] counter;
// Token: 0x040072D8 RID: 29400
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40072D8")]
private readonly byte[] counterOut;
// Token: 0x040072D9 RID: 29401
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40072D9")]
private byte[] IV;
}
}