130 lines
3.8 KiB
C#
130 lines
3.8 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities
|
|
{
|
|
// Token: 0x0200134A RID: 4938
|
|
[Token(Token = "0x200134A")]
|
|
[StructLayout(3)]
|
|
public abstract class Strings
|
|
{
|
|
// Token: 0x06007C90 RID: 31888 RVA: 0x0019E990 File Offset: 0x0019CB90
|
|
[Token(Token = "0x6007C90")]
|
|
[Address(RVA = "0x20346C0", Offset = "0x20330C0", VA = "0x1820346C0")]
|
|
internal static bool IsOneOf(string s, params string[] candidates)
|
|
{
|
|
int num = 0;
|
|
int length = candidates.Length;
|
|
if (num < length)
|
|
{
|
|
string text = candidates[num];
|
|
if (!string.Equals(s, text))
|
|
{
|
|
num++;
|
|
}
|
|
return true;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007C91 RID: 31889 RVA: 0x0000220F File Offset: 0x0000040F
|
|
[Token(Token = "0x6007C91")]
|
|
[Address(RVA = "0x2034570", Offset = "0x2032F70", VA = "0x182034570")]
|
|
public static string FromByteArray(byte[] bs)
|
|
{
|
|
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
|
}
|
|
|
|
// Token: 0x06007C92 RID: 31890 RVA: 0x0019E9CC File Offset: 0x0019CBCC
|
|
[Token(Token = "0x6007C92")]
|
|
[Address(RVA = "0x20347D0", Offset = "0x20331D0", VA = "0x1820347D0")]
|
|
public static byte[] ToByteArray(char[] cs)
|
|
{
|
|
byte[] array = new byte[cs.Length];
|
|
int num = 0;
|
|
if (num < array.Length)
|
|
{
|
|
byte b = Convert.ToByte(cs[num]);
|
|
num++;
|
|
}
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x06007C93 RID: 31891 RVA: 0x0019EA08 File Offset: 0x0019CC08
|
|
[Token(Token = "0x6007C93")]
|
|
[Address(RVA = "0x20348C0", Offset = "0x20332C0", VA = "0x1820348C0")]
|
|
public static byte[] ToByteArray(string s)
|
|
{
|
|
byte[] array = new byte[s.m_stringLength];
|
|
int num = 0;
|
|
if (num < array.Length)
|
|
{
|
|
byte b = Convert.ToByte(s[num]);
|
|
num++;
|
|
}
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x06007C94 RID: 31892 RVA: 0x0019EA44 File Offset: 0x0019CC44
|
|
[Token(Token = "0x6007C94")]
|
|
[Address(RVA = "0x2034520", Offset = "0x2032F20", VA = "0x182034520")]
|
|
public static string FromAsciiByteArray(byte[] bytes)
|
|
{
|
|
return Encoding.ASCII.GetString(bytes);
|
|
}
|
|
|
|
// Token: 0x06007C95 RID: 31893 RVA: 0x0019EA64 File Offset: 0x0019CC64
|
|
[Token(Token = "0x6007C95")]
|
|
[Address(RVA = "0x2034750", Offset = "0x2033150", VA = "0x182034750")]
|
|
public static byte[] ToAsciiByteArray(char[] cs)
|
|
{
|
|
Encoding ascii = Encoding.ASCII;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007C96 RID: 31894 RVA: 0x0019EA80 File Offset: 0x0019CC80
|
|
[Token(Token = "0x6007C96")]
|
|
[Address(RVA = "0x2034790", Offset = "0x2033190", VA = "0x182034790")]
|
|
public static byte[] ToAsciiByteArray(string s)
|
|
{
|
|
Encoding ascii = Encoding.ASCII;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007C97 RID: 31895 RVA: 0x0019EA9C File Offset: 0x0019CC9C
|
|
[Token(Token = "0x6007C97")]
|
|
[Address(RVA = "0x2034670", Offset = "0x2033070", VA = "0x182034670")]
|
|
public static string FromUtf8ByteArray(byte[] bytes)
|
|
{
|
|
return Encoding.UTF8.GetString(bytes);
|
|
}
|
|
|
|
// Token: 0x06007C98 RID: 31896 RVA: 0x0019EABC File Offset: 0x0019CCBC
|
|
[Token(Token = "0x6007C98")]
|
|
[Address(RVA = "0x20349A0", Offset = "0x20333A0", VA = "0x1820349A0")]
|
|
public static byte[] ToUtf8ByteArray(char[] cs)
|
|
{
|
|
Encoding utf = Encoding.UTF8;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007C99 RID: 31897 RVA: 0x0019EAD8 File Offset: 0x0019CCD8
|
|
[Token(Token = "0x6007C99")]
|
|
[Address(RVA = "0xE61020", Offset = "0xE5FA20", VA = "0x180E61020")]
|
|
public static byte[] ToUtf8ByteArray(string s)
|
|
{
|
|
Encoding utf = Encoding.UTF8;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06007C9A RID: 31898 RVA: 0x0019EAF4 File Offset: 0x0019CCF4
|
|
[Token(Token = "0x6007C9A")]
|
|
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
|
protected Strings()
|
|
{
|
|
}
|
|
}
|
|
}
|