scripts
This commit is contained in:
+233
@@ -0,0 +1,233 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO.Pem
|
||||
{
|
||||
// Token: 0x0200136B RID: 4971
|
||||
[Token(Token = "0x200136B")]
|
||||
[StructLayout(3)]
|
||||
public class PemWriter
|
||||
{
|
||||
// Token: 0x06007DC0 RID: 32192 RVA: 0x001A6474 File Offset: 0x001A4674
|
||||
[Token(Token = "0x6007DC0")]
|
||||
[Address(RVA = "0x2032E60", Offset = "0x2031860", VA = "0x182032E60")]
|
||||
public PemWriter(TextWriter writer)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06007DC0)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO.Pem.PemWriter::.ctor(System.IO.TextWriter)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_33:
|
||||
stloc:ArgumentNullException(var_2_3D, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("writer")))
|
||||
}
|
||||
|
||||
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: 0x17001478 RID: 5240
|
||||
// (get) Token: 0x06007DC1 RID: 32193 RVA: 0x001A64C0 File Offset: 0x001A46C0
|
||||
[Token(Token = "0x17001478")]
|
||||
public TextWriter Writer
|
||||
{
|
||||
[Token(Token = "0x6007DC1")]
|
||||
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
||||
get
|
||||
{
|
||||
return this.writer;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007DC2 RID: 32194 RVA: 0x001A64D4 File Offset: 0x001A46D4
|
||||
[Token(Token = "0x6007DC2")]
|
||||
[Address(RVA = "0x2032370", Offset = "0x2030D70", VA = "0x182032370")]
|
||||
public int GetOutputSize(PemObject obj)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
string type = obj.type;
|
||||
IList headers = obj.headers;
|
||||
if (type <= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
IList headers2 = obj.headers;
|
||||
int num3;
|
||||
if (type != 0)
|
||||
{
|
||||
if (num < type)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
ulong num2;
|
||||
num2 += (ulong)1L;
|
||||
if (type == 0)
|
||||
{
|
||||
goto IL_8C;
|
||||
}
|
||||
int stringLength = type.ToString().m_stringLength;
|
||||
num3 += this;
|
||||
num3 += stringLength;
|
||||
}
|
||||
if (num3 != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
int num4 = obj.content.Length;
|
||||
num4 += 2;
|
||||
throw new NullReferenceException();
|
||||
IL_8C:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007DC3 RID: 32195 RVA: 0x001A6578 File Offset: 0x001A4778
|
||||
[Token(Token = "0x6007DC3")]
|
||||
[Address(RVA = "0x20327C0", Offset = "0x20311C0", VA = "0x1820327C0")]
|
||||
public void WriteObject(PemObjectGenerator objGen)
|
||||
{
|
||||
int num;
|
||||
int num2;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
num += num;
|
||||
num++;
|
||||
string text;
|
||||
if (text <= 0)
|
||||
{
|
||||
goto IL_4A;
|
||||
}
|
||||
if (text != 0)
|
||||
{
|
||||
if (num < text)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (text == 0)
|
||||
{
|
||||
}
|
||||
if (text == 0)
|
||||
{
|
||||
goto IL_C3;
|
||||
}
|
||||
string text2 = text.ToString();
|
||||
}
|
||||
num2 = 0;
|
||||
int num3;
|
||||
if (num3 != 0)
|
||||
{
|
||||
}
|
||||
if (num != -1)
|
||||
{
|
||||
}
|
||||
}
|
||||
while (num != 0);
|
||||
TextWriter textWriter = this.writer;
|
||||
IL_4A:
|
||||
byte[] array;
|
||||
if (num2 < array.Length)
|
||||
{
|
||||
char[] array2 = this.buf;
|
||||
int length = array2.Length;
|
||||
if (num2 != length && 0 < array.Length)
|
||||
{
|
||||
byte b;
|
||||
array2[0] = (char)b;
|
||||
num2++;
|
||||
}
|
||||
char[] array3 = this.buf;
|
||||
}
|
||||
string text3 = "-----END " + num2 + "-----";
|
||||
return;
|
||||
IL_C3:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06007DC4 RID: 32196 RVA: 0x001A6650 File Offset: 0x001A4850
|
||||
[Token(Token = "0x6007DC4")]
|
||||
[Address(RVA = "0x20326D0", Offset = "0x20310D0", VA = "0x1820326D0")]
|
||||
private void WriteEncoded(byte[] bytes)
|
||||
{
|
||||
byte[] array = Base64.Encode(bytes);
|
||||
int num = 0;
|
||||
if (num < array.Length)
|
||||
{
|
||||
int num2 = 0;
|
||||
char[] array2 = this.buf;
|
||||
int length = array2.Length;
|
||||
if (num2 != length && 0 < array.Length)
|
||||
{
|
||||
num2++;
|
||||
byte b;
|
||||
array2[0] = (char)b;
|
||||
}
|
||||
this.writer.WriteLine(array2);
|
||||
char[] array3 = this.buf;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06007DC5 RID: 32197 RVA: 0x001A66C0 File Offset: 0x001A48C0
|
||||
[Token(Token = "0x6007DC5")]
|
||||
[Address(RVA = "0x2032DE0", Offset = "0x20317E0", VA = "0x182032DE0")]
|
||||
private void WritePreEncapsulationBoundary(string type)
|
||||
{
|
||||
TextWriter textWriter = this.writer;
|
||||
string text = "-----BEGIN " + type + "-----";
|
||||
Encoding encoding = textWriter.Encoding;
|
||||
}
|
||||
|
||||
// Token: 0x06007DC6 RID: 32198 RVA: 0x001A66F4 File Offset: 0x001A48F4
|
||||
[Token(Token = "0x6007DC6")]
|
||||
[Address(RVA = "0x2032D60", Offset = "0x2031760", VA = "0x182032D60")]
|
||||
private void WritePostEncapsulationBoundary(string type)
|
||||
{
|
||||
TextWriter textWriter = this.writer;
|
||||
string text = "-----END " + type + "-----";
|
||||
Encoding encoding = textWriter.Encoding;
|
||||
}
|
||||
|
||||
// Token: 0x04005A39 RID: 23097
|
||||
[Token(Token = "0x4005A39")]
|
||||
private const int LineLength = 64;
|
||||
|
||||
// Token: 0x04005A3A RID: 23098
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4005A3A")]
|
||||
private readonly TextWriter writer;
|
||||
|
||||
// Token: 0x04005A3B RID: 23099
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4005A3B")]
|
||||
private readonly int nlLength;
|
||||
|
||||
// Token: 0x04005A3C RID: 23100
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4005A3C")]
|
||||
private char[] buf;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user