This commit is contained in:
niko
2026-04-08 23:40:05 +02:00
parent d6894bcbc7
commit 18dc73f922
7750 changed files with 1795369 additions and 0 deletions
@@ -0,0 +1,275 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.TeleTrust;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Encodings;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers
{
// Token: 0x020015DD RID: 5597
[Token(Token = "0x20015DD")]
[StructLayout(3)]
public class RsaDigestSigner : ISigner
{
// Token: 0x060095A9 RID: 38313 RVA: 0x00212DD4 File Offset: 0x00210FD4
[Token(Token = "0x60095A9")]
[Address(RVA = "0x1E49CC0", Offset = "0x1E486C0", VA = "0x181E49CC0")]
static RsaDigestSigner()
{
IDictionary dictionary = RsaDigestSigner.oidMap;
DerObjectIdentifier ripeMD = TeleTrusTObjectIdentifiers.RipeMD128;
IDictionary dictionary2 = RsaDigestSigner.oidMap;
DerObjectIdentifier ripeMD2 = TeleTrusTObjectIdentifiers.RipeMD160;
IDictionary dictionary3 = RsaDigestSigner.oidMap;
DerObjectIdentifier ripeMD3 = TeleTrusTObjectIdentifiers.RipeMD256;
IDictionary dictionary4 = RsaDigestSigner.oidMap;
DerObjectIdentifier idSha = X509ObjectIdentifiers.IdSha1;
IDictionary dictionary5 = RsaDigestSigner.oidMap;
DerObjectIdentifier idSha2 = NistObjectIdentifiers.IdSha224;
IDictionary dictionary6 = RsaDigestSigner.oidMap;
DerObjectIdentifier idSha3 = NistObjectIdentifiers.IdSha256;
IDictionary dictionary7 = RsaDigestSigner.oidMap;
DerObjectIdentifier idSha4 = NistObjectIdentifiers.IdSha384;
IDictionary dictionary8 = RsaDigestSigner.oidMap;
DerObjectIdentifier idSha5 = NistObjectIdentifiers.IdSha512;
IDictionary dictionary9 = RsaDigestSigner.oidMap;
DerObjectIdentifier md = PkcsObjectIdentifiers.MD2;
IDictionary dictionary10 = RsaDigestSigner.oidMap;
DerObjectIdentifier md2 = PkcsObjectIdentifiers.MD4;
IDictionary dictionary11 = RsaDigestSigner.oidMap;
DerObjectIdentifier md3 = PkcsObjectIdentifiers.MD5;
}
// Token: 0x060095AA RID: 38314 RVA: 0x00212E8C File Offset: 0x0021108C
[Token(Token = "0x60095AA")]
[Address(RVA = "0x1E4A390", Offset = "0x1E48D90", VA = "0x181E4A390")]
public RsaDigestSigner(IDigest digest)
{
IDictionary dictionary = RsaDigestSigner.oidMap;
IDictionary dictionary2 = RsaDigestSigner.oidMap;
RsaCoreEngine rsaCoreEngine = new RsaCoreEngine();
}
// Token: 0x060095AB RID: 38315 RVA: 0x00212EB8 File Offset: 0x002110B8
[Token(Token = "0x60095AB")]
[Address(RVA = "0x1E4A570", Offset = "0x1E48F70", VA = "0x181E4A570")]
public RsaDigestSigner(IDigest digest, DerObjectIdentifier digestOid)
{
DerNull instance = DerNull.Instance;
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(digestOid, instance);
RsaCoreEngine rsaCoreEngine = new RsaCoreEngine();
}
// Token: 0x060095AC RID: 38316 RVA: 0x00212EDC File Offset: 0x002110DC
[Token(Token = "0x60095AC")]
[Address(RVA = "0x1E4A170", Offset = "0x1E48B70", VA = "0x181E4A170")]
public RsaDigestSigner(IDigest digest, AlgorithmIdentifier algId)
{
RsaCoreEngine rsaCoreEngine = new RsaCoreEngine();
}
// Token: 0x060095AD RID: 38317 RVA: 0x00212EF0 File Offset: 0x002110F0
[Token(Token = "0x60095AD")]
[Address(RVA = "0x1E4A2C0", Offset = "0x1E48CC0", VA = "0x181E4A2C0")]
public RsaDigestSigner(IRsa rsa, IDigest digest, DerObjectIdentifier digestOid)
{
DerNull instance = DerNull.Instance;
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(digestOid, instance);
}
// Token: 0x060095AE RID: 38318 RVA: 0x00212F0C File Offset: 0x0021110C
[Token(Token = "0x60095AE")]
[Address(RVA = "0x1E4A1F0", Offset = "0x1E48BF0", VA = "0x181E4A1F0")]
public RsaDigestSigner(IRsa rsa, IDigest digest, AlgorithmIdentifier algId)
{
RsaBlindedEngine rsaBlindedEngine = new RsaBlindedEngine(rsa);
int num = 0;
int num2 = 0;
base.FieldGetter(num2, num, algId);
Pkcs1Encoding pkcs1Encoding = new Pkcs1Encoding(rsaBlindedEngine);
this.rsaEngine = pkcs1Encoding;
this.algId = algId;
this.digest = digest;
}
// Token: 0x060095AF RID: 38319 RVA: 0x00212F4C File Offset: 0x0021114C
[Token(Token = "0x60095AF")]
[Address(RVA = "0x1E4A0E0", Offset = "0x1E48AE0", VA = "0x181E4A0E0")]
public RsaDigestSigner(IAsymmetricBlockCipher rsaEngine, IDigest digest, AlgorithmIdentifier algId)
{
Pkcs1Encoding pkcs1Encoding = new Pkcs1Encoding(rsaEngine);
this.rsaEngine = pkcs1Encoding;
this.digest = digest;
this.algId = algId;
}
// Token: 0x170017EC RID: 6124
// (get) Token: 0x060095B0 RID: 38320 RVA: 0x00212F7C File Offset: 0x0021117C
[Token(Token = "0x170017EC")]
public virtual string AlgorithmName
{
[Token(Token = "0x60095B0")]
[Address(RVA = "0x1E4A670", Offset = "0x1E49070", VA = "0x181E4A670", Slot = "11")]
get
{
IDigest digest = this.digest;
return 0 + "withRSA";
}
}
// Token: 0x060095B1 RID: 38321 RVA: 0x00212FA4 File Offset: 0x002111A4
[Token(Token = "0x60095B1")]
[Address(RVA = "0x1E496A0", Offset = "0x1E480A0", VA = "0x181E496A0", Slot = "12")]
public virtual void Init(bool forSigning, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (060095B1)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers.RsaDigestSigner::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_4C:
stloc:InvalidKeyException(var_8_56, newobj:InvalidKeyException(InvalidKeyException::.ctor, ldstr:string("Signing requires private key.")))
stloc:InvalidKeyException(var_9_62, newobj:InvalidKeyException(InvalidKeyException::.ctor, ldstr:string("Verification requires public 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.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: 0x060095B2 RID: 38322 RVA: 0x00213014 File Offset: 0x00211214
[Token(Token = "0x60095B2")]
[Address(RVA = "0x1E49970", Offset = "0x1E48370", VA = "0x181E49970", Slot = "13")]
public virtual void Update(byte input)
{
IDigest digest = this.digest;
throw new NullReferenceException();
}
// Token: 0x060095B3 RID: 38323 RVA: 0x00213030 File Offset: 0x00211230
[Token(Token = "0x60095B3")]
[Address(RVA = "0x1E49480", Offset = "0x1E47E80", VA = "0x181E49480", Slot = "14")]
public virtual void BlockUpdate(byte[] input, int inOff, int length)
{
IDigest digest = this.digest;
}
// Token: 0x060095B4 RID: 38324 RVA: 0x0021304C File Offset: 0x0021124C
[Token(Token = "0x60095B4")]
[Address(RVA = "0x1E49590", Offset = "0x1E47F90", VA = "0x181E49590", Slot = "15")]
public virtual byte[] GenerateSignature()
{
/*
An exception occurred when decompiling this method (060095B4)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers.RsaDigestSigner::GenerateSignature()
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_3B:
stloc:InvalidOperationException(var_8_45, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("RsaDigestSigner not initialised for signature generation.")))
}
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: 0x060095B5 RID: 38325 RVA: 0x002130A0 File Offset: 0x002112A0
[Token(Token = "0x60095B5")]
[Address(RVA = "0x1E499D0", Offset = "0x1E483D0", VA = "0x181E499D0", Slot = "16")]
public virtual bool VerifySignature(byte[] signature)
{
/*
An exception occurred when decompiling this method (060095B5)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers.RsaDigestSigner::VerifySignature(System.Byte[])
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_6A:
stloc:InvalidOperationException(var_10_74, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("RsaDigestSigner not initialised for verification")))
}
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: 0x060095B6 RID: 38326 RVA: 0x00213124 File Offset: 0x00211324
[Token(Token = "0x60095B6")]
[Address(RVA = "0x1E49920", Offset = "0x1E48320", VA = "0x181E49920", Slot = "17")]
public virtual void Reset()
{
IDigest digest = this.digest;
throw new NullReferenceException();
}
// Token: 0x060095B7 RID: 38327 RVA: 0x00213140 File Offset: 0x00211340
[Token(Token = "0x60095B7")]
[Address(RVA = "0x1E49500", Offset = "0x1E47F00", VA = "0x181E49500")]
private byte[] DerEncode(byte[] hash)
{
AlgorithmIdentifier algorithmIdentifier = this.algId;
if (algorithmIdentifier != 0)
{
return new DigestInfo(algorithmIdentifier, hash).GetDerEncoded();
}
return hash;
}
// Token: 0x040062D3 RID: 25299
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x40062D3")]
private readonly IAsymmetricBlockCipher rsaEngine;
// Token: 0x040062D4 RID: 25300
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40062D4")]
private readonly AlgorithmIdentifier algId;
// Token: 0x040062D5 RID: 25301
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x40062D5")]
private readonly IDigest digest;
// Token: 0x040062D6 RID: 25302
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x40062D6")]
private bool forSigning;
// Token: 0x040062D7 RID: 25303
[Token(Token = "0x40062D7")]
private static readonly IDictionary oidMap = Platform.CreateHashtable();
}
}