m
This commit is contained in:
@@ -0,0 +1,129 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.Authentication
|
||||
{
|
||||
// Token: 0x020020AB RID: 8363
|
||||
[Token(Token = "0x20020AB")]
|
||||
public static class DigestStore
|
||||
{
|
||||
// Token: 0x0600D288 RID: 53896 RVA: 0x00302108 File Offset: 0x00300308
|
||||
[Token(Token = "0x600D288")]
|
||||
[Address(RVA = "0x169CF30", Offset = "0x169BF30", VA = "0x18169CF30")]
|
||||
public static Digest Get(Uri uri)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
object locker = DigestStore.Locker;
|
||||
int num2 = 0;
|
||||
Dictionary<string, Digest> digests = DigestStore.Digests;
|
||||
string host = uri.Host;
|
||||
if (digests.TryGetValue(host, num2))
|
||||
{
|
||||
string host2 = uri.Host;
|
||||
string host3 = uri.Host;
|
||||
bool flag;
|
||||
if (string.CompareOrdinal(host2, host3) == 0 && uri.GetHashCode() != 0 && num < uri.m_originalUnicodeString && !flag)
|
||||
{
|
||||
num++;
|
||||
}
|
||||
}
|
||||
Monitor.Exit(locker);
|
||||
}
|
||||
while (num != 0);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600D289 RID: 53897 RVA: 0x003021A4 File Offset: 0x003003A4
|
||||
[Token(Token = "0x600D289")]
|
||||
[Address(RVA = "0x169CD00", Offset = "0x169BD00", VA = "0x18169CD00")]
|
||||
public static Digest GetOrCreate(Uri uri)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
int num = 0;
|
||||
object locker = DigestStore.Locker;
|
||||
int num2 = 0;
|
||||
Dictionary<string, Digest> digests = DigestStore.Digests;
|
||||
string host = uri.Host;
|
||||
if (!digests.TryGetValue(host, num2))
|
||||
{
|
||||
break;
|
||||
}
|
||||
Monitor.Exit(locker);
|
||||
if (num == 0)
|
||||
{
|
||||
goto Block_1;
|
||||
}
|
||||
}
|
||||
Dictionary<string, Digest> digests2 = DigestStore.Digests;
|
||||
string host2 = uri.Host;
|
||||
Digest digest;
|
||||
digest.<Uri>k__BackingField = uri;
|
||||
digest.<Algorithm>k__BackingField = "md5";
|
||||
throw new NullReferenceException();
|
||||
Block_1:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600D28A RID: 53898 RVA: 0x0030221C File Offset: 0x0030041C
|
||||
[Token(Token = "0x600D28A")]
|
||||
[Address(RVA = "0x169D1A0", Offset = "0x169C1A0", VA = "0x18169D1A0")]
|
||||
public static void Remove(Uri uri)
|
||||
{
|
||||
int num;
|
||||
do
|
||||
{
|
||||
num = 0;
|
||||
object locker = DigestStore.Locker;
|
||||
Dictionary<string, Digest> digests = DigestStore.Digests;
|
||||
string host = uri.Host;
|
||||
bool flag = digests.Remove(host);
|
||||
Monitor.Exit(locker);
|
||||
}
|
||||
while (num != 0);
|
||||
}
|
||||
|
||||
// Token: 0x0600D28B RID: 53899 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600D28B")]
|
||||
[Address(RVA = "0x169CB20", Offset = "0x169BB20", VA = "0x18169CB20")]
|
||||
public static string FindBest(List<string> authHeaders)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x0600D28C RID: 53900 RVA: 0x00302260 File Offset: 0x00300460
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x600D28C")]
|
||||
[Address(RVA = "0x169D2E0", Offset = "0x169C2E0", VA = "0x18169D2E0")]
|
||||
static DigestStore()
|
||||
{
|
||||
string[] array = new string[2];
|
||||
if ("digest" != 0)
|
||||
{
|
||||
}
|
||||
array[0] = "digest";
|
||||
if ("basic" != 0)
|
||||
{
|
||||
}
|
||||
array[1] = "basic";
|
||||
DigestStore.SupportedAlgorithms = array;
|
||||
}
|
||||
|
||||
// Token: 0x040085DC RID: 34268
|
||||
[Token(Token = "0x40085DC")]
|
||||
private static Dictionary<string, Digest> Digests = new Dictionary();
|
||||
|
||||
// Token: 0x040085DD RID: 34269
|
||||
[Token(Token = "0x40085DD")]
|
||||
private static object Locker = new object();
|
||||
|
||||
// Token: 0x040085DE RID: 34270
|
||||
[Token(Token = "0x40085DE")]
|
||||
private static string[] SupportedAlgorithms;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user