Files
27Aug2021-Cpp2IL-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Crypto/Modes/OcbBlockCipher.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +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: 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;
}
}