122 lines
5.7 KiB
C#
122 lines
5.7 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
|
|
{
|
|
// Token: 0x02001BE1 RID: 7137
|
|
[Token(Token = "0x2001BE1")]
|
|
public class DesEdeParameters : DesParameters
|
|
{
|
|
// Token: 0x0600B279 RID: 45689 RVA: 0x0026E44C File Offset: 0x0026C64C
|
|
[Token(Token = "0x600B279")]
|
|
[Address(RVA = "0x1803A20", Offset = "0x1802820", VA = "0x181803A20")]
|
|
private static byte[] FixKey(byte[] key, int keyOff, int keyLen)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B279)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.DesEdeParameters::FixKey(System.Byte[],System.Int32,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_5C:
|
|
stloc:ArgumentException(var_9_66, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("attempt to create weak DESede key")))
|
|
}
|
|
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
|
|
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
|
|
--- End of inner exception stack trace ---
|
|
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
|
|
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600B27A RID: 45690 RVA: 0x0026E4C0 File Offset: 0x0026C6C0
|
|
[Token(Token = "0x600B27A")]
|
|
[Address(RVA = "0x1803F50", Offset = "0x1802D50", VA = "0x181803F50")]
|
|
public DesEdeParameters(byte[] key)
|
|
{
|
|
int length = key.Length;
|
|
int num = 0;
|
|
byte[] array = DesEdeParameters.FixKey(key, num, length);
|
|
base..ctor(array);
|
|
}
|
|
|
|
// Token: 0x0600B27B RID: 45691 RVA: 0x0026E4EC File Offset: 0x0026C6EC
|
|
[Token(Token = "0x600B27B")]
|
|
[Address(RVA = "0x1803FD0", Offset = "0x1802DD0", VA = "0x181803FD0")]
|
|
public DesEdeParameters(byte[] key, int keyOff, int keyLen)
|
|
{
|
|
byte[] array = DesEdeParameters.FixKey(key, keyOff, keyOff);
|
|
base..ctor(array);
|
|
}
|
|
|
|
// Token: 0x0600B27C RID: 45692 RVA: 0x0026E50C File Offset: 0x0026C70C
|
|
[Token(Token = "0x600B27C")]
|
|
[Address(RVA = "0x1803E80", Offset = "0x1802C80", VA = "0x181803E80")]
|
|
public static bool IsWeakKey(byte[] key, int offset, int length)
|
|
{
|
|
while (offset < length && DesParameters.IsWeakKey(key, offset))
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B27D RID: 45693 RVA: 0x0026E528 File Offset: 0x0026C728
|
|
[Token(Token = "0x600B27D")]
|
|
[Address(RVA = "0x1803E50", Offset = "0x1802C50", VA = "0x181803E50")]
|
|
public new static bool IsWeakKey(byte[] key, int offset)
|
|
{
|
|
int num = key.Length;
|
|
num -= offset;
|
|
return DesEdeParameters.IsWeakKey(key, offset, num);
|
|
}
|
|
|
|
// Token: 0x0600B27E RID: 45694 RVA: 0x0026E550 File Offset: 0x0026C750
|
|
[Token(Token = "0x600B27E")]
|
|
[Address(RVA = "0x1803F20", Offset = "0x1802D20", VA = "0x181803F20")]
|
|
public new static bool IsWeakKey(byte[] key)
|
|
{
|
|
int length = key.Length;
|
|
int num = 0;
|
|
return DesEdeParameters.IsWeakKey(key, num, length);
|
|
}
|
|
|
|
// Token: 0x0600B27F RID: 45695 RVA: 0x0026E574 File Offset: 0x0026C774
|
|
[Token(Token = "0x600B27F")]
|
|
[Address(RVA = "0x1803CE0", Offset = "0x1802AE0", VA = "0x181803CE0")]
|
|
public static bool IsRealEdeKey(byte[] key, int offset)
|
|
{
|
|
int length = key.Length;
|
|
if (length == 16)
|
|
{
|
|
}
|
|
byte b = key[offset];
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600B280 RID: 45696 RVA: 0x0026E5A0 File Offset: 0x0026C7A0
|
|
[Token(Token = "0x600B280")]
|
|
[Address(RVA = "0x1803B80", Offset = "0x1802980", VA = "0x181803B80")]
|
|
public static bool IsReal2Key(byte[] key, int offset)
|
|
{
|
|
int length = key.Length;
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x0600B281 RID: 45697 RVA: 0x0026E5BC File Offset: 0x0026C7BC
|
|
[Token(Token = "0x600B281")]
|
|
[Address(RVA = "0x1803C00", Offset = "0x1802A00", VA = "0x181803C00")]
|
|
public static bool IsReal3Key(byte[] key, int offset)
|
|
{
|
|
int length = key.Length;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x040071AF RID: 29103
|
|
[Token(Token = "0x40071AF")]
|
|
public const int DesEdeKeyLength = 24;
|
|
}
|
|
}
|