oh dear
This commit is contained in:
+270
@@ -0,0 +1,270 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Encodings
|
||||
{
|
||||
// Token: 0x02001CBC RID: 7356
|
||||
[Token(Token = "0x2001CBC")]
|
||||
public class ISO9796d1Encoding : IAsymmetricBlockCipher
|
||||
{
|
||||
// Token: 0x0600B967 RID: 47463 RVA: 0x0029A444 File Offset: 0x00298644
|
||||
[Token(Token = "0x600B967")]
|
||||
[Address(RVA = "0x3FFB80", Offset = "0x3FE980", VA = "0x1803FFB80")]
|
||||
public ISO9796d1Encoding(IAsymmetricBlockCipher cipher)
|
||||
{
|
||||
this.engine = cipher;
|
||||
}
|
||||
|
||||
// Token: 0x17001D03 RID: 7427
|
||||
// (get) Token: 0x0600B968 RID: 47464 RVA: 0x0029A460 File Offset: 0x00298660
|
||||
[Token(Token = "0x17001D03")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B968")]
|
||||
[Address(RVA = "0x1A740B0", Offset = "0x1A72EB0", VA = "0x181A740B0", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
return 0 + "/ISO9796-1Padding";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B969 RID: 47465 RVA: 0x0029A488 File Offset: 0x00298688
|
||||
[Token(Token = "0x600B969")]
|
||||
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
|
||||
public IAsymmetricBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.engine;
|
||||
}
|
||||
|
||||
// Token: 0x0600B96A RID: 47466 RVA: 0x0029A49C File Offset: 0x0029869C
|
||||
[Token(Token = "0x600B96A")]
|
||||
[Address(RVA = "0x1A73D30", Offset = "0x1A72B30", VA = "0x181A73D30", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
while (parameters != 0)
|
||||
{
|
||||
if ((parameters != 0 || parameters != 0) && parameters != 0 && parameters != 0)
|
||||
{
|
||||
if (parameters == 0)
|
||||
{
|
||||
IL_2A:
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
this.modulus = (uint)1;
|
||||
this.forEncryption = forEncryption;
|
||||
int num;
|
||||
this.bitSize = num;
|
||||
return;
|
||||
}
|
||||
if (parameters != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
goto IL_2A;
|
||||
}
|
||||
|
||||
// Token: 0x0600B96B RID: 47467 RVA: 0x0029A4F8 File Offset: 0x002986F8
|
||||
[Token(Token = "0x600B96B")]
|
||||
[Address(RVA = "0x1A73C70", Offset = "0x1A72A70", VA = "0x181A73C70", Slot = "6")]
|
||||
public int GetInputBlockSize()
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
if (this.inverse != (ulong)0L)
|
||||
{
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B96C RID: 47468 RVA: 0x0029A51C File Offset: 0x0029871C
|
||||
[Token(Token = "0x600B96C")]
|
||||
[Address(RVA = "0x1A73CD0", Offset = "0x1A72AD0", VA = "0x181A73CD0", Slot = "7")]
|
||||
public int GetOutputBlockSize()
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
if (this.inverse == (ulong)0L)
|
||||
{
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B96D RID: 47469 RVA: 0x0029A540 File Offset: 0x00298740
|
||||
[Token(Token = "0x600B96D")]
|
||||
[Address(RVA = "0x1A73F50", Offset = "0x1A72D50", VA = "0x181A73F50")]
|
||||
public void SetPadBits(int padBits)
|
||||
{
|
||||
this.padBits = padBits;
|
||||
}
|
||||
|
||||
// Token: 0x0600B96E RID: 47470 RVA: 0x0029A560 File Offset: 0x00298760
|
||||
[Token(Token = "0x600B96E")]
|
||||
[Address(RVA = "0x3F7310", Offset = "0x3F6110", VA = "0x1803F7310")]
|
||||
public int GetPadBits()
|
||||
{
|
||||
return this.padBits;
|
||||
}
|
||||
|
||||
// Token: 0x0600B96F RID: 47471 RVA: 0x0029A574 File Offset: 0x00298774
|
||||
[Token(Token = "0x600B96F")]
|
||||
[Address(RVA = "0x1A73F20", Offset = "0x1A72D20", VA = "0x181A73F20", Slot = "8")]
|
||||
public byte[] ProcessBlock(byte[] input, int inOff, int length)
|
||||
{
|
||||
if (this.inverse == (ulong)0L)
|
||||
{
|
||||
return this.DecodeBlock(input, inOff, length);
|
||||
}
|
||||
return this.EncodeBlock(input, inOff, length);
|
||||
}
|
||||
|
||||
// Token: 0x0600B970 RID: 47472 RVA: 0x0029A5A0 File Offset: 0x002987A0
|
||||
[Token(Token = "0x600B970")]
|
||||
[Address(RVA = "0x1A738E0", Offset = "0x1A726E0", VA = "0x181A738E0")]
|
||||
private byte[] EncodeBlock(byte[] input, int inOff, int inLen)
|
||||
{
|
||||
int num = this.bitSize;
|
||||
num += 7;
|
||||
byte[] array = new byte[input];
|
||||
int num2 = this.padBits;
|
||||
int num3 = this.bitSize;
|
||||
num2++;
|
||||
num3 += 13;
|
||||
int num4 = 0;
|
||||
num3 += input;
|
||||
if (num3 > 0)
|
||||
{
|
||||
num3 -= inLen;
|
||||
int num5 = array.Length;
|
||||
num5 -= num4;
|
||||
num5 -= inLen;
|
||||
int num6 = array.Length;
|
||||
num6 -= inLen;
|
||||
num4 += inLen;
|
||||
num3 = inLen - inLen;
|
||||
}
|
||||
int num7 = array.Length;
|
||||
num7 -= num3;
|
||||
int length = array.Length;
|
||||
int num8;
|
||||
if (num7 != length)
|
||||
{
|
||||
num3 = num7;
|
||||
num3 -= 0;
|
||||
num3 -= num3;
|
||||
num8 = ISO9796d1Encoding.shadows.Length;
|
||||
num8 = num7;
|
||||
num8++;
|
||||
num7 += 2;
|
||||
}
|
||||
byte b;
|
||||
num8 -= (int)b;
|
||||
int length2 = array.Length;
|
||||
if (length2 - 1 < length2)
|
||||
{
|
||||
}
|
||||
uint num9;
|
||||
byte b2;
|
||||
num9 -= (uint)b2;
|
||||
int length3 = array.Length;
|
||||
if (num9 == (uint)8)
|
||||
{
|
||||
array[0] = (byte)((ulong)0L);
|
||||
}
|
||||
uint num10;
|
||||
array[0] = (byte)num10;
|
||||
uint num11;
|
||||
array[0] = (byte)num11;
|
||||
int num12 = 0;
|
||||
int num13 = array.Length;
|
||||
num13 -= num12;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B971 RID: 47473 RVA: 0x0029A6B8 File Offset: 0x002988B8
|
||||
[Token(Token = "0x600B971")]
|
||||
[Address(RVA = "0x1A732E0", Offset = "0x1A720E0", VA = "0x181A732E0")]
|
||||
private byte[] DecodeBlock(byte[] input, int inOff, int inLen)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B971)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Encodings.ISO9796d1Encoding::DecodeBlock(System.Byte[],System.Int32,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_140:
|
||||
stloc:InvalidCipherTextException(var_33_14A, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("resulting integer iS or (modulus - iS) is not congruent to 6 mod 16")))
|
||||
}
|
||||
|
||||
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: 0x0600B972 RID: 47474 RVA: 0x0029A810 File Offset: 0x00298A10
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x600B972")]
|
||||
[Address(RVA = "0x1A73FC0", Offset = "0x1A72DC0", VA = "0x181A73FC0")]
|
||||
static ISO9796d1Encoding()
|
||||
{
|
||||
BigInteger bigInteger;
|
||||
ISO9796d1Encoding.Sixteen = bigInteger;
|
||||
BigInteger bigInteger2;
|
||||
ISO9796d1Encoding.Six = bigInteger2;
|
||||
byte[] array = new byte[16];
|
||||
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.27C3AB82CCA6CE2F199F4F670BF19513A3825B87).FieldHandle);
|
||||
ISO9796d1Encoding.shadows = array;
|
||||
byte[] array2 = new byte[16];
|
||||
RuntimeHelpers.InitializeArray(array2, fieldof(<PrivateImplementationDetails>.30F65A149AF7DE938A9287048498B966AEBE54D4).FieldHandle);
|
||||
ISO9796d1Encoding.inverse = array2;
|
||||
}
|
||||
|
||||
// Token: 0x04007602 RID: 30210
|
||||
[Token(Token = "0x4007602")]
|
||||
private static readonly BigInteger Sixteen;
|
||||
|
||||
// Token: 0x04007603 RID: 30211
|
||||
[Token(Token = "0x4007603")]
|
||||
private static readonly BigInteger Six;
|
||||
|
||||
// Token: 0x04007604 RID: 30212
|
||||
[Token(Token = "0x4007604")]
|
||||
private static readonly byte[] shadows;
|
||||
|
||||
// Token: 0x04007605 RID: 30213
|
||||
[Token(Token = "0x4007605")]
|
||||
private static readonly byte[] inverse;
|
||||
|
||||
// Token: 0x04007606 RID: 30214
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007606")]
|
||||
private readonly IAsymmetricBlockCipher engine;
|
||||
|
||||
// Token: 0x04007607 RID: 30215
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007607")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x04007608 RID: 30216
|
||||
[FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x4007608")]
|
||||
private int bitSize;
|
||||
|
||||
// Token: 0x04007609 RID: 30217
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007609")]
|
||||
private int padBits;
|
||||
|
||||
// Token: 0x0400760A RID: 30218
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400760A")]
|
||||
private BigInteger modulus;
|
||||
}
|
||||
}
|
||||
+360
@@ -0,0 +1,360 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Encodings
|
||||
{
|
||||
// Token: 0x02001CBD RID: 7357
|
||||
[Token(Token = "0x2001CBD")]
|
||||
public class OaepEncoding : IAsymmetricBlockCipher
|
||||
{
|
||||
// Token: 0x0600B973 RID: 47475 RVA: 0x0029A85C File Offset: 0x00298A5C
|
||||
[Token(Token = "0x600B973")]
|
||||
[Address(RVA = "0x1A74C00", Offset = "0x1A73A00", VA = "0x181A74C00")]
|
||||
public OaepEncoding(IAsymmetricBlockCipher cipher)
|
||||
{
|
||||
Sha1Digest sha1Digest = new Sha1Digest();
|
||||
}
|
||||
|
||||
// Token: 0x0600B974 RID: 47476 RVA: 0x0029A870 File Offset: 0x00298A70
|
||||
[Token(Token = "0x600B974")]
|
||||
[Address(RVA = "0x1A74BE0", Offset = "0x1A739E0", VA = "0x181A74BE0")]
|
||||
public OaepEncoding(IAsymmetricBlockCipher cipher, IDigest hash)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600B975 RID: 47477 RVA: 0x0029A880 File Offset: 0x00298A80
|
||||
[Token(Token = "0x600B975")]
|
||||
[Address(RVA = "0x1A74C80", Offset = "0x1A73A80", VA = "0x181A74C80")]
|
||||
public OaepEncoding(IAsymmetricBlockCipher cipher, IDigest hash, byte[] encodingParams)
|
||||
{
|
||||
this.engine = cipher;
|
||||
this.mgf1Hash = hash;
|
||||
byte[] array = new byte[0];
|
||||
this.defHash = array;
|
||||
if (encodingParams != 0)
|
||||
{
|
||||
int length = encodingParams.Length;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B976 RID: 47478 RVA: 0x0029A8C4 File Offset: 0x00298AC4
|
||||
[Token(Token = "0x600B976")]
|
||||
[Address(RVA = "0x1A74AF0", Offset = "0x1A738F0", VA = "0x181A74AF0")]
|
||||
public OaepEncoding(IAsymmetricBlockCipher cipher, IDigest hash, IDigest mgf1Hash, byte[] encodingParams)
|
||||
{
|
||||
this.engine = cipher;
|
||||
this.mgf1Hash = mgf1Hash;
|
||||
byte[] array = new byte[0];
|
||||
this.defHash = array;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B977 RID: 47479 RVA: 0x0029A8FC File Offset: 0x00298AFC
|
||||
[Token(Token = "0x600B977")]
|
||||
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400")]
|
||||
public IAsymmetricBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.engine;
|
||||
}
|
||||
|
||||
// Token: 0x17001D04 RID: 7428
|
||||
// (get) Token: 0x0600B978 RID: 47480 RVA: 0x0029A910 File Offset: 0x00298B10
|
||||
[Token(Token = "0x17001D04")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B978")]
|
||||
[Address(RVA = "0x1A74D70", Offset = "0x1A73B70", VA = "0x181A74D70", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
return 0 + "/OAEPPadding";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B979 RID: 47481 RVA: 0x0029A938 File Offset: 0x00298B38
|
||||
[Token(Token = "0x600B979")]
|
||||
[Address(RVA = "0x1A749A0", Offset = "0x1A737A0", VA = "0x181A749A0", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters param)
|
||||
{
|
||||
while (param != 0 && param != 0 && param == 0)
|
||||
{
|
||||
}
|
||||
SecureRandom secureRandom = new SecureRandom();
|
||||
this.random = secureRandom;
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
this.forEncryption = forEncryption;
|
||||
}
|
||||
|
||||
// Token: 0x0600B97A RID: 47482 RVA: 0x0029A978 File Offset: 0x00298B78
|
||||
[Token(Token = "0x600B97A")]
|
||||
[Address(RVA = "0x1A748C0", Offset = "0x1A736C0", VA = "0x181A748C0", Slot = "6")]
|
||||
public int GetInputBlockSize()
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
int num = this.defHash.Length;
|
||||
num += num;
|
||||
uint num2;
|
||||
num2 -= (uint)num;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B97B RID: 47483 RVA: 0x0029A9B0 File Offset: 0x00298BB0
|
||||
[Token(Token = "0x600B97B")]
|
||||
[Address(RVA = "0x1A74930", Offset = "0x1A73730", VA = "0x181A74930", Slot = "7")]
|
||||
public int GetOutputBlockSize()
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
int num = this.defHash.Length;
|
||||
num += num;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B97C RID: 47484 RVA: 0x0029A9E4 File Offset: 0x00298BE4
|
||||
[Token(Token = "0x600B97C")]
|
||||
[Address(RVA = "0x1A74AC0", Offset = "0x1A738C0", VA = "0x181A74AC0", Slot = "8")]
|
||||
public byte[] ProcessBlock(byte[] inBytes, int inOff, int inLen)
|
||||
{
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
return this.DecodeBlock(inBytes, inOff, inLen);
|
||||
}
|
||||
return this.EncodeBlock(inBytes, inOff, inLen);
|
||||
}
|
||||
|
||||
// Token: 0x0600B97D RID: 47485 RVA: 0x0029AA10 File Offset: 0x00298C10
|
||||
[Token(Token = "0x600B97D")]
|
||||
[Address(RVA = "0x1A74520", Offset = "0x1A73320", VA = "0x181A74520")]
|
||||
private byte[] EncodeBlock(byte[] inBytes, int inOff, int inLen)
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
uint num2;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
int num = this.defHash.Length;
|
||||
num += num;
|
||||
num2 -= (uint)num;
|
||||
}
|
||||
Check.DataLength(inLen > (int)num2, "input data too long");
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher2 = this.engine;
|
||||
byte[] array = this.defHash;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
int num3 = array.Length;
|
||||
num3 += num3;
|
||||
}
|
||||
int num4 = array.Length;
|
||||
num4 += num4;
|
||||
num4++;
|
||||
byte[] array2 = new byte[0];
|
||||
int num5 = array2.Length;
|
||||
int num6 = 0;
|
||||
num5 -= inLen;
|
||||
Array.Copy(inBytes, inOff, array2, num5, inLen);
|
||||
int num7 = array2.Length;
|
||||
num7 -= inLen;
|
||||
byte[] array3 = this.defHash;
|
||||
int length = array3.Length;
|
||||
int num8 = 0;
|
||||
Array.Copy(array3, num8, array2, length, length);
|
||||
byte[] array4 = this.defHash;
|
||||
SecureRandom secureRandom = this.random;
|
||||
int length2 = array4.Length;
|
||||
byte[] nextBytes = SecureRandom.GetNextBytes(secureRandom, length2);
|
||||
byte[] array5 = this.defHash;
|
||||
int length3 = array2.Length;
|
||||
int num9 = 0;
|
||||
int length4 = nextBytes.Length;
|
||||
byte[] array6 = this.maskGeneratorFunction1(nextBytes, num9, length4, length3);
|
||||
int num10 = this.defHash.Length;
|
||||
if (num10 != array2.Length)
|
||||
{
|
||||
byte[] array7 = this.defHash;
|
||||
num10++;
|
||||
}
|
||||
int length5 = this.defHash.Length;
|
||||
int num11 = 0;
|
||||
int num12 = 0;
|
||||
Array.Copy(nextBytes, num12, array2, num11, length5);
|
||||
int length6 = this.defHash.Length;
|
||||
int num13 = array2.Length;
|
||||
num13 -= length6;
|
||||
byte[] array8 = this.maskGeneratorFunction1(array2, length6, num13, length6);
|
||||
byte[] array9 = this.defHash;
|
||||
if (num6 != array9.Length)
|
||||
{
|
||||
num6++;
|
||||
byte[] array10 = this.defHash;
|
||||
}
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher3 = this.engine;
|
||||
int length7 = array2.Length;
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B97E RID: 47486 RVA: 0x0029ABE8 File Offset: 0x00298DE8
|
||||
[Token(Token = "0x600B97E")]
|
||||
[Address(RVA = "0x1A74110", Offset = "0x1A72F10", VA = "0x181A74110")]
|
||||
private byte[] DecodeBlock(byte[] inBytes, int inOff, int inLen)
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher2 = this.engine;
|
||||
byte[] array = new byte[0];
|
||||
int length = this.defHash.Length;
|
||||
int num = array.Length;
|
||||
num -= typeof(IAsymmetricBlockCipher).TypeHandle;
|
||||
int num2 = 0;
|
||||
int length2 = this.defHash.Length;
|
||||
int num3 = array.Length;
|
||||
num3 -= length2;
|
||||
byte[] array2 = this.maskGeneratorFunction1(array, length2, num3, length2);
|
||||
byte[] array3 = this.defHash;
|
||||
byte[] array4;
|
||||
if (num2 != array3.Length)
|
||||
{
|
||||
num2++;
|
||||
array4 = this.defHash;
|
||||
}
|
||||
int num4 = array.Length;
|
||||
int num5 = 0;
|
||||
int length3 = array4.Length;
|
||||
num4 -= length3;
|
||||
byte[] array5 = this.maskGeneratorFunction1(array, num5, length3, num4);
|
||||
int num6 = this.defHash.Length;
|
||||
int num7 = array.Length;
|
||||
if (num6 != num7)
|
||||
{
|
||||
byte[] array6 = this.defHash;
|
||||
num7 = num6;
|
||||
num6++;
|
||||
}
|
||||
int length4 = this.defHash.Length;
|
||||
if (num2 != length4)
|
||||
{
|
||||
num2++;
|
||||
}
|
||||
if (num2 != num7)
|
||||
{
|
||||
num2++;
|
||||
bool flag = num7 == num7;
|
||||
}
|
||||
num7++;
|
||||
int num8 = num7 - 1;
|
||||
num7 -= num7;
|
||||
byte[] array7 = new byte[num7];
|
||||
int length5 = array7.Length;
|
||||
int num9 = 0;
|
||||
Array.Copy(array, num7, array7, num9, length5);
|
||||
return array7;
|
||||
}
|
||||
|
||||
// Token: 0x0600B97F RID: 47487 RVA: 0x0029AD44 File Offset: 0x00298F44
|
||||
[Token(Token = "0x600B97F")]
|
||||
[Address(RVA = "0x189BD10", Offset = "0x189AB10", VA = "0x18189BD10")]
|
||||
private void ItoOSP(int i, byte[] sp)
|
||||
{
|
||||
sp[0] = (byte)i;
|
||||
sp[0] = (byte)i;
|
||||
sp[0] = (byte)i;
|
||||
sp[0] = (byte)i;
|
||||
}
|
||||
|
||||
// Token: 0x0600B980 RID: 47488 RVA: 0x0029AD78 File Offset: 0x00298F78
|
||||
[Token(Token = "0x600B980")]
|
||||
[Address(RVA = "0x1A74DD0", Offset = "0x1A73BD0", VA = "0x181A74DD0")]
|
||||
private byte[] maskGeneratorFunction1(byte[] Z, int zOff, int zLen, int length)
|
||||
{
|
||||
byte[] array = new byte[0];
|
||||
IDigest digest = this.mgf1Hash;
|
||||
byte[] array2 = new byte[array];
|
||||
byte[] array3 = new byte[4];
|
||||
IDigest digest2 = this.mgf1Hash;
|
||||
int num = 0;
|
||||
int num2 = 0;
|
||||
int length2 = array2.Length;
|
||||
array3[0] = (byte)num;
|
||||
array3[0] = (byte)num;
|
||||
array3[0] = (byte)num;
|
||||
array3[0] = (byte)num;
|
||||
IDigest digest3 = this.mgf1Hash;
|
||||
if (num2 < num2)
|
||||
{
|
||||
num2 += num2;
|
||||
num2++;
|
||||
}
|
||||
IDigest digest4 = this.mgf1Hash;
|
||||
int num3 = 0;
|
||||
num3 += num3;
|
||||
num3++;
|
||||
int num4 = 0;
|
||||
IDigest digest5 = this.mgf1Hash;
|
||||
int num5 = 0;
|
||||
if (num5 < num4)
|
||||
{
|
||||
num5 += num5;
|
||||
num5++;
|
||||
}
|
||||
int num6 = array2.Length;
|
||||
int num7 = num6 * num;
|
||||
int num8 = 0;
|
||||
Array.Copy(array2, num8, array, num7, num6);
|
||||
num++;
|
||||
num8 += num8;
|
||||
num6 += 4;
|
||||
num6 += 19;
|
||||
num8 += num8;
|
||||
num6 += 4;
|
||||
num6 += 19;
|
||||
num8 += num8;
|
||||
num6 += 5;
|
||||
num6 += 19;
|
||||
array3[0] = (byte)num;
|
||||
array3[0] = (byte)num;
|
||||
array3[0] = (byte)num;
|
||||
array3[0] = (byte)num;
|
||||
IDigest digest6 = this.mgf1Hash;
|
||||
IDigest digest7 = this.mgf1Hash;
|
||||
int length3 = array3.Length;
|
||||
IDigest digest8 = this.mgf1Hash;
|
||||
int length4 = array2.Length;
|
||||
int num9 = array.Length;
|
||||
int num10 = 0;
|
||||
int num11 = length4 * num;
|
||||
num9 -= num11;
|
||||
Array.Copy(array2, num10, array, num11, num9);
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0400760B RID: 30219
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400760B")]
|
||||
private byte[] defHash;
|
||||
|
||||
// Token: 0x0400760C RID: 30220
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400760C")]
|
||||
private IDigest mgf1Hash;
|
||||
|
||||
// Token: 0x0400760D RID: 30221
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x400760D")]
|
||||
private IAsymmetricBlockCipher engine;
|
||||
|
||||
// Token: 0x0400760E RID: 30222
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x400760E")]
|
||||
private SecureRandom random;
|
||||
|
||||
// Token: 0x0400760F RID: 30223
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400760F")]
|
||||
private bool forEncryption;
|
||||
}
|
||||
}
|
||||
+355
@@ -0,0 +1,355 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Encodings
|
||||
{
|
||||
// Token: 0x02001CBE RID: 7358
|
||||
[Token(Token = "0x2001CBE")]
|
||||
public class Pkcs1Encoding : IAsymmetricBlockCipher
|
||||
{
|
||||
// Token: 0x17001D05 RID: 7429
|
||||
// (get) Token: 0x0600B981 RID: 47489 RVA: 0x0029AF18 File Offset: 0x00299118
|
||||
// (set) Token: 0x0600B982 RID: 47490 RVA: 0x0029AF40 File Offset: 0x00299140
|
||||
[Token(Token = "0x17001D05")]
|
||||
public static bool StrictLengthEnabled
|
||||
{
|
||||
[Token(Token = "0x600B981")]
|
||||
[Address(RVA = "0x1A76370", Offset = "0x1A75170", VA = "0x181A76370")]
|
||||
get
|
||||
{
|
||||
bool[] array = Pkcs1Encoding.strictLengthEnabled;
|
||||
return "{il2cpp array field local0->}" != (ulong)0L;
|
||||
}
|
||||
[Token(Token = "0x600B982")]
|
||||
[Address(RVA = "0x1A763F0", Offset = "0x1A751F0", VA = "0x181A763F0")]
|
||||
set
|
||||
{
|
||||
Pkcs1Encoding.strictLengthEnabled[0] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B983 RID: 47491 RVA: 0x0029AF60 File Offset: 0x00299160
|
||||
[Token(Token = "0x600B983")]
|
||||
[Address(RVA = "0x1A76090", Offset = "0x1A74E90", VA = "0x181A76090")]
|
||||
static Pkcs1Encoding()
|
||||
{
|
||||
string environmentVariable = Platform.GetEnvironmentVariable("BestHTTP.SecureProtocol.Org.BouncyCastle.Pkcs1.Strict");
|
||||
bool[] array = new bool[1];
|
||||
if (environmentVariable == 0)
|
||||
{
|
||||
}
|
||||
bool flag = environmentVariable.Equals("true");
|
||||
array[0] = flag;
|
||||
Pkcs1Encoding.strictLengthEnabled = array;
|
||||
}
|
||||
|
||||
// Token: 0x0600B984 RID: 47492 RVA: 0x0029AFA4 File Offset: 0x002991A4
|
||||
[Token(Token = "0x600B984")]
|
||||
[Address(RVA = "0x1A76290", Offset = "0x1A75090", VA = "0x181A76290")]
|
||||
public Pkcs1Encoding(IAsymmetricBlockCipher cipher)
|
||||
{
|
||||
this.engine = cipher;
|
||||
bool flag = Pkcs1Encoding.StrictLengthEnabled;
|
||||
this.useStrictLength = flag;
|
||||
}
|
||||
|
||||
// Token: 0x0600B985 RID: 47493 RVA: 0x0029AFE0 File Offset: 0x002991E0
|
||||
[Token(Token = "0x600B985")]
|
||||
[Address(RVA = "0x1A76160", Offset = "0x1A74F60", VA = "0x181A76160")]
|
||||
public Pkcs1Encoding(IAsymmetricBlockCipher cipher, int pLen)
|
||||
{
|
||||
this.engine = cipher;
|
||||
bool flag = Pkcs1Encoding.StrictLengthEnabled;
|
||||
this.pLen = pLen;
|
||||
this.useStrictLength = flag;
|
||||
}
|
||||
|
||||
// Token: 0x0600B986 RID: 47494 RVA: 0x0029B020 File Offset: 0x00299220
|
||||
[Token(Token = "0x600B986")]
|
||||
[Address(RVA = "0x1A761F0", Offset = "0x1A74FF0", VA = "0x181A761F0")]
|
||||
public Pkcs1Encoding(IAsymmetricBlockCipher cipher, byte[] fallback)
|
||||
{
|
||||
this.engine = cipher;
|
||||
bool flag = Pkcs1Encoding.StrictLengthEnabled;
|
||||
this.useStrictLength = flag;
|
||||
this.fallback = fallback;
|
||||
int length = fallback.Length;
|
||||
this.pLen = length;
|
||||
}
|
||||
|
||||
// Token: 0x0600B987 RID: 47495 RVA: 0x0029B074 File Offset: 0x00299274
|
||||
[Token(Token = "0x600B987")]
|
||||
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")]
|
||||
public IAsymmetricBlockCipher GetUnderlyingCipher()
|
||||
{
|
||||
return this.engine;
|
||||
}
|
||||
|
||||
// Token: 0x17001D06 RID: 7430
|
||||
// (get) Token: 0x0600B988 RID: 47496 RVA: 0x0029B088 File Offset: 0x00299288
|
||||
[Token(Token = "0x17001D06")]
|
||||
public string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B988")]
|
||||
[Address(RVA = "0x1A76310", Offset = "0x1A75110", VA = "0x181A76310", Slot = "4")]
|
||||
get
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
return 0 + "/PKCS1Padding";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B989 RID: 47497 RVA: 0x0029B0B0 File Offset: 0x002992B0
|
||||
[Token(Token = "0x600B989")]
|
||||
[Address(RVA = "0x1A75DF0", Offset = "0x1A74BF0", VA = "0x181A75DF0", Slot = "5")]
|
||||
public void Init(bool forEncryption, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B989)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Encodings.Pkcs1Encoding::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_84:
|
||||
stloc:ArgumentException(var_8_8E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("encoder requires random")))
|
||||
}
|
||||
|
||||
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: 0x0600B98A RID: 47498 RVA: 0x0029B14C File Offset: 0x0029934C
|
||||
[Token(Token = "0x600B98A")]
|
||||
[Address(RVA = "0x1A75D30", Offset = "0x1A74B30", VA = "0x181A75D30", Slot = "6")]
|
||||
public int GetInputBlockSize()
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B98B RID: 47499 RVA: 0x0029B170 File Offset: 0x00299370
|
||||
[Token(Token = "0x600B98B")]
|
||||
[Address(RVA = "0x1A75D90", Offset = "0x1A74B90", VA = "0x181A75D90", Slot = "7")]
|
||||
public int GetOutputBlockSize()
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
if (!this.forEncryption)
|
||||
{
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B98C RID: 47500 RVA: 0x0029B194 File Offset: 0x00299394
|
||||
[Token(Token = "0x600B98C")]
|
||||
[Address(RVA = "0x1A76060", Offset = "0x1A74E60", VA = "0x181A76060", Slot = "8")]
|
||||
public byte[] ProcessBlock(byte[] input, int inOff, int length)
|
||||
{
|
||||
if (this.forEncryption)
|
||||
{
|
||||
return this.EncodeBlock(input, inOff, length);
|
||||
}
|
||||
return this.DecodeBlock(input, inOff, length);
|
||||
}
|
||||
|
||||
// Token: 0x0600B98D RID: 47501 RVA: 0x0029B1C0 File Offset: 0x002993C0
|
||||
[Token(Token = "0x600B98D")]
|
||||
[Address(RVA = "0x1A759B0", Offset = "0x1A747B0", VA = "0x181A759B0")]
|
||||
private byte[] EncodeBlock(byte[] input, int inOff, int inLen)
|
||||
{
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
if (this.forEncryption)
|
||||
{
|
||||
}
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher2 = this.engine;
|
||||
byte[] array = new byte[0];
|
||||
if (!this.forPrivateKey)
|
||||
{
|
||||
double num = this.random.NextDouble();
|
||||
array[0] = (byte)((ulong)2L);
|
||||
int num2 = array.Length;
|
||||
num2 -= inLen;
|
||||
uint num3;
|
||||
if (num3 == (uint)num2)
|
||||
{
|
||||
goto IL_83;
|
||||
}
|
||||
int length = array.Length;
|
||||
SecureRandom secureRandom = this.random;
|
||||
num3 += (uint)1;
|
||||
}
|
||||
int num4 = array.Length;
|
||||
num4 -= inLen;
|
||||
uint num5;
|
||||
if (num5 != (uint)num4)
|
||||
{
|
||||
num5 += (uint)1;
|
||||
}
|
||||
IL_83:
|
||||
num4 -= inLen;
|
||||
int num6 = num4 - 1;
|
||||
int num7 = array.Length;
|
||||
num7 -= inLen;
|
||||
num4 = inOff;
|
||||
Array.Copy(input, num4, array, num7, inLen);
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher3 = this.engine;
|
||||
int length2 = array.Length;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B98E RID: 47502 RVA: 0x0029B294 File Offset: 0x00299494
|
||||
[Token(Token = "0x600B98E")]
|
||||
[Address(RVA = "0x1A752A0", Offset = "0x1A740A0", VA = "0x181A752A0")]
|
||||
private static int CheckPkcs1Encoding(byte[] encoded, int pLen)
|
||||
{
|
||||
int num = encoded.Length;
|
||||
num -= pLen;
|
||||
uint num2;
|
||||
if (num - 1 > (int)num2)
|
||||
{
|
||||
num2 += (uint)1;
|
||||
}
|
||||
int num3 = num - 1;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B98F RID: 47503 RVA: 0x0029B2C0 File Offset: 0x002994C0
|
||||
[Token(Token = "0x600B98F")]
|
||||
[Address(RVA = "0x1A75390", Offset = "0x1A74190", VA = "0x181A75390")]
|
||||
private byte[] DecodeBlockOrRandom(byte[] input, int inOff, int inLen)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B98F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Encodings.Pkcs1Encoding::DecodeBlockOrRandom(System.Byte[],System.Int32,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_C7:
|
||||
stloc:InvalidCipherTextException(var_18_D1, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("sorry, this method is only for decryption, not for signing")))
|
||||
}
|
||||
|
||||
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: 0x0600B990 RID: 47504 RVA: 0x0029B3A0 File Offset: 0x002995A0
|
||||
[Token(Token = "0x600B990")]
|
||||
[Address(RVA = "0x1A756A0", Offset = "0x1A744A0", VA = "0x181A756A0")]
|
||||
private byte[] DecodeBlock(byte[] input, int inOff, int inLen)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B990)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Encodings.Pkcs1Encoding::DecodeBlock(System.Byte[],System.Int32,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_C5:
|
||||
stloc:InvalidCipherTextException(var_20_CF, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("block incorrect 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.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: 0x0600B991 RID: 47505 RVA: 0x0029B480 File Offset: 0x00299680
|
||||
[Token(Token = "0x600B991")]
|
||||
[Address(RVA = "0x1A75C80", Offset = "0x1A74A80", VA = "0x181A75C80")]
|
||||
private int FindStart(byte type, byte[] block)
|
||||
{
|
||||
int length = block.Length;
|
||||
if ((uint)1 != (uint)length)
|
||||
{
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Token: 0x04007610 RID: 30224
|
||||
[Token(Token = "0x4007610")]
|
||||
public const string StrictLengthEnabledProperty = "BestHTTP.SecureProtocol.Org.BouncyCastle.Pkcs1.Strict";
|
||||
|
||||
// Token: 0x04007611 RID: 30225
|
||||
[Token(Token = "0x4007611")]
|
||||
private const int HeaderLength = 10;
|
||||
|
||||
// Token: 0x04007612 RID: 30226
|
||||
[Token(Token = "0x4007612")]
|
||||
private static readonly bool[] strictLengthEnabled;
|
||||
|
||||
// Token: 0x04007613 RID: 30227
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007613")]
|
||||
private SecureRandom random;
|
||||
|
||||
// Token: 0x04007614 RID: 30228
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007614")]
|
||||
private IAsymmetricBlockCipher engine;
|
||||
|
||||
// Token: 0x04007615 RID: 30229
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4007615")]
|
||||
private bool forEncryption;
|
||||
|
||||
// Token: 0x04007616 RID: 30230
|
||||
[FieldOffset(Offset = "0x21")]
|
||||
[Token(Token = "0x4007616")]
|
||||
private bool forPrivateKey;
|
||||
|
||||
// Token: 0x04007617 RID: 30231
|
||||
[FieldOffset(Offset = "0x22")]
|
||||
[Token(Token = "0x4007617")]
|
||||
private bool useStrictLength;
|
||||
|
||||
// Token: 0x04007618 RID: 30232
|
||||
[FieldOffset(Offset = "0x24")]
|
||||
[Token(Token = "0x4007618")]
|
||||
private int pLen = (int)((ulong)4294967295L);
|
||||
|
||||
// Token: 0x04007619 RID: 30233
|
||||
[FieldOffset(Offset = "0x28")]
|
||||
[Token(Token = "0x4007619")]
|
||||
private byte[] fallback;
|
||||
|
||||
// Token: 0x0400761A RID: 30234
|
||||
[FieldOffset(Offset = "0x30")]
|
||||
[Token(Token = "0x400761A")]
|
||||
private byte[] blockBuffer;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user