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

631 lines
24 KiB
C#

using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001C3D RID: 7229
[Token(Token = "0x2001C3D")]
public class OcbBlockCipher : IAeadBlockCipher
{
// Token: 0x0600B4B2 RID: 46258 RVA: 0x0027660C File Offset: 0x0027480C
[Token(Token = "0x600B4B2")]
[Address(RVA = "0x180E450", Offset = "0x180D250", VA = "0x18180E450")]
public OcbBlockCipher(IBlockCipher hashCipher, IBlockCipher mainCipher)
{
/*
An exception occurred when decompiling this method (0600B4B2)
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 1660
*/;
}
// Token: 0x0600B4B3 RID: 46259 RVA: 0x0027668C File Offset: 0x0027488C
[Token(Token = "0x600B4B3")]
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "17")]
public virtual IBlockCipher GetUnderlyingCipher()
{
return this.mainCipher;
}
// Token: 0x17001C82 RID: 7298
// (get) Token: 0x0600B4B4 RID: 46260 RVA: 0x002766A0 File Offset: 0x002748A0
[Token(Token = "0x17001C82")]
public virtual string AlgorithmName
{
[Token(Token = "0x600B4B4")]
[Address(RVA = "0x180E6E0", Offset = "0x180D4E0", VA = "0x18180E6E0", Slot = "18")]
get
{
IBlockCipher blockCipher = this.mainCipher;
return 0 + "/OCB";
}
}
// Token: 0x0600B4B5 RID: 46261 RVA: 0x002766C8 File Offset: 0x002748C8
[Token(Token = "0x600B4B5")]
[Address(RVA = "0x180CFF0", Offset = "0x180BDF0", VA = "0x18180CFF0", Slot = "19")]
public virtual void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (0600B4B5)
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 1660
*/;
}
// Token: 0x0600B4B6 RID: 46262 RVA: 0x002768C0 File Offset: 0x00274AC0
[Token(Token = "0x600B4B6")]
[Address(RVA = "0x180DDF0", Offset = "0x180CBF0", VA = "0x18180DDF0", 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: 0x0600B4B7 RID: 46263 RVA: 0x00276988 File Offset: 0x00274B88
[Token(Token = "0x600B4B7")]
[Address(RVA = "0x4B6B10", Offset = "0x4B5910", VA = "0x1804B6B10", Slot = "21")]
public virtual int GetBlockSize()
{
return 16;
}
// Token: 0x0600B4B8 RID: 46264 RVA: 0x00276998 File Offset: 0x00274B98
[Token(Token = "0x600B4B8")]
[Address(RVA = "0x180CF10", Offset = "0x180BD10", VA = "0x18180CF10", Slot = "22")]
public virtual byte[] GetMac()
{
byte[] array = this.macBlock;
if (array == 0)
{
}
return Arrays.Clone(array);
}
// Token: 0x0600B4B9 RID: 46265 RVA: 0x002769B8 File Offset: 0x00274BB8
[Token(Token = "0x600B4B9")]
[Address(RVA = "0x180CF90", Offset = "0x180BD90", VA = "0x18180CF90", 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: 0x0600B4BA RID: 46266 RVA: 0x002769F4 File Offset: 0x00274BF4
[Token(Token = "0x600B4BA")]
[Address(RVA = "0x180CFC0", Offset = "0x180BDC0", VA = "0x18180CFC0", 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: 0x0600B4BB RID: 46267 RVA: 0x00276A30 File Offset: 0x00274C30
[Token(Token = "0x600B4BB")]
[Address(RVA = "0x180D800", Offset = "0x180C600", VA = "0x18180D800", 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: 0x0600B4BC RID: 46268 RVA: 0x00276A7C File Offset: 0x00274C7C
[Token(Token = "0x600B4BC")]
[Address(RVA = "0x180D870", Offset = "0x180C670", VA = "0x18180D870", 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: 0x0600B4BD RID: 46269 RVA: 0x00276ACC File Offset: 0x00274CCC
[Token(Token = "0x600B4BD")]
[Address(RVA = "0x180D950", Offset = "0x180C750", VA = "0x18180D950", 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: 0x0600B4BE RID: 46270 RVA: 0x00276B1C File Offset: 0x00274D1C
[Token(Token = "0x600B4BE")]
[Address(RVA = "0x180D9D0", Offset = "0x180C7D0", VA = "0x18180D9D0", 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: 0x0600B4BF RID: 46271 RVA: 0x00276B84 File Offset: 0x00274D84
[Token(Token = "0x600B4BF")]
[Address(RVA = "0x180C790", Offset = "0x180B590", VA = "0x18180C790", Slot = "29")]
public virtual int DoFinal(byte[] output, int outOff)
{
/*
An exception occurred when decompiling this method (0600B4BF)
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 1660
*/;
}
// Token: 0x0600B4C0 RID: 46272 RVA: 0x00276DA4 File Offset: 0x00274FA4
[Token(Token = "0x600B4C0")]
[Address(RVA = "0x180E1A0", Offset = "0x180CFA0", VA = "0x18180E1A0", Slot = "30")]
public virtual void Reset()
{
string algorithmName = ((IAeadBlockCipher)this).AlgorithmName;
}
// Token: 0x0600B4C1 RID: 46273 RVA: 0x00276DB8 File Offset: 0x00274FB8
[Token(Token = "0x600B4C1")]
[Address(RVA = "0x180C770", Offset = "0x180B570", VA = "0x18180C770", 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: 0x0600B4C2 RID: 46274 RVA: 0x00276DDC File Offset: 0x00274FDC
[Token(Token = "0x600B4C2")]
[Address(RVA = "0x180CC10", Offset = "0x180BA10", VA = "0x18180CC10", 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: 0x0600B4C3 RID: 46275 RVA: 0x00276E5C File Offset: 0x0027505C
[Token(Token = "0x600B4C3")]
[Address(RVA = "0x180DAD0", Offset = "0x180C8D0", VA = "0x18180DAD0", Slot = "33")]
protected virtual void ProcessHashBlock()
{
long num = this.hashBlockCount;
this.hashBlockCount = num;
int num2 = 0;
num2++;
this.hashBlockPos = (int)((ulong)0L);
}
// Token: 0x0600B4C4 RID: 46276 RVA: 0x00276E88 File Offset: 0x00275088
[Token(Token = "0x600B4C4")]
[Address(RVA = "0x180DB40", Offset = "0x180C940", VA = "0x18180DB40", 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: 0x0600B4C5 RID: 46277 RVA: 0x00276F88 File Offset: 0x00275188
[Token(Token = "0x600B4C5")]
[Address(RVA = "0x180E030", Offset = "0x180CE30", VA = "0x18180E030", 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: 0x0600B4C6 RID: 46278 RVA: 0x00277024 File Offset: 0x00275224
[Token(Token = "0x600B4C6")]
[Address(RVA = "0x180E240", Offset = "0x180D040", VA = "0x18180E240", 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: 0x0600B4C7 RID: 46279 RVA: 0x00277070 File Offset: 0x00275270
[Token(Token = "0x600B4C7")]
[Address(RVA = "0x180D670", Offset = "0x180C470", VA = "0x18180D670")]
protected static byte[] OCB_double(byte[] block)
{
byte[] array = new byte[16];
byte b;
b += b;
uint num;
num -= (uint)b;
return array;
}
// Token: 0x0600B4C8 RID: 46280 RVA: 0x00277094 File Offset: 0x00275294
[Token(Token = "0x600B4C8")]
[Address(RVA = "0x180D760", Offset = "0x180C560", VA = "0x18180D760")]
protected static void OCB_extend(byte[] block, int pos)
{
int num = pos + 1;
if (num < 16)
{
num++;
}
}
// Token: 0x0600B4C9 RID: 46281 RVA: 0x002770B4 File Offset: 0x002752B4
[Token(Token = "0x600B4C9")]
[Address(RVA = "0x180D7D0", Offset = "0x180C5D0", VA = "0x18180D7D0")]
protected static int OCB_ntz(long x)
{
int num = 0;
return num + 1;
}
// Token: 0x0600B4CA RID: 46282 RVA: 0x002770CC File Offset: 0x002752CC
[Token(Token = "0x600B4CA")]
[Address(RVA = "0x180E1C0", Offset = "0x180CFC0", VA = "0x18180E1C0")]
protected static int ShiftLeft(byte[] block, byte[] output)
{
byte b;
b += b;
throw new NullReferenceException();
}
// Token: 0x0600B4CB RID: 46283 RVA: 0x002770E4 File Offset: 0x002752E4
[Token(Token = "0x600B4CB")]
[Address(RVA = "0x180E3E0", Offset = "0x180D1E0", VA = "0x18180E3E0")]
protected static void Xor(byte[] block, byte[] val)
{
}
// Token: 0x040072B2 RID: 29362
[Token(Token = "0x40072B2")]
private const int BLOCK_SIZE = 16;
// Token: 0x040072B3 RID: 29363
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x40072B3")]
private readonly IBlockCipher hashCipher;
// Token: 0x040072B4 RID: 29364
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40072B4")]
private readonly IBlockCipher mainCipher;
// Token: 0x040072B5 RID: 29365
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40072B5")]
private bool forEncryption;
// Token: 0x040072B6 RID: 29366
[FieldOffset(Offset = "0x24")]
[Token(Token = "0x40072B6")]
private int macSize;
// Token: 0x040072B7 RID: 29367
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40072B7")]
private byte[] initialAssociatedText;
// Token: 0x040072B8 RID: 29368
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40072B8")]
private IList L;
// Token: 0x040072B9 RID: 29369
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40072B9")]
private byte[] L_Asterisk;
// Token: 0x040072BA RID: 29370
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x40072BA")]
private byte[] L_Dollar;
// Token: 0x040072BB RID: 29371
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x40072BB")]
private byte[] KtopInput;
// Token: 0x040072BC RID: 29372
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x40072BC")]
private byte[] Stretch;
// Token: 0x040072BD RID: 29373
[FieldOffset(Offset = "0x58")]
[Token(Token = "0x40072BD")]
private byte[] OffsetMAIN_0;
// Token: 0x040072BE RID: 29374
[FieldOffset(Offset = "0x60")]
[Token(Token = "0x40072BE")]
private byte[] hashBlock;
// Token: 0x040072BF RID: 29375
[FieldOffset(Offset = "0x68")]
[Token(Token = "0x40072BF")]
private byte[] mainBlock;
// Token: 0x040072C0 RID: 29376
[FieldOffset(Offset = "0x70")]
[Token(Token = "0x40072C0")]
private int hashBlockPos;
// Token: 0x040072C1 RID: 29377
[FieldOffset(Offset = "0x74")]
[Token(Token = "0x40072C1")]
private int mainBlockPos;
// Token: 0x040072C2 RID: 29378
[FieldOffset(Offset = "0x78")]
[Token(Token = "0x40072C2")]
private long hashBlockCount;
// Token: 0x040072C3 RID: 29379
[FieldOffset(Offset = "0x80")]
[Token(Token = "0x40072C3")]
private long mainBlockCount;
// Token: 0x040072C4 RID: 29380
[FieldOffset(Offset = "0x88")]
[Token(Token = "0x40072C4")]
private byte[] OffsetHASH;
// Token: 0x040072C5 RID: 29381
[FieldOffset(Offset = "0x90")]
[Token(Token = "0x40072C5")]
private byte[] Sum;
// Token: 0x040072C6 RID: 29382
[FieldOffset(Offset = "0x98")]
[Token(Token = "0x40072C6")]
private byte[] OffsetMAIN;
// Token: 0x040072C7 RID: 29383
[FieldOffset(Offset = "0xA0")]
[Token(Token = "0x40072C7")]
private byte[] Checksum;
// Token: 0x040072C8 RID: 29384
[FieldOffset(Offset = "0xA8")]
[Token(Token = "0x40072C8")]
private byte[] macBlock;
}
}