scripts
This commit is contained in:
+131
@@ -0,0 +1,131 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Prng.Drbg
|
||||
{
|
||||
// Token: 0x020015F7 RID: 5623
|
||||
[Token(Token = "0x20015F7")]
|
||||
[StructLayout(3)]
|
||||
internal class DrbgUtilities
|
||||
{
|
||||
// Token: 0x06009648 RID: 38472 RVA: 0x00215914 File Offset: 0x00213B14
|
||||
[Token(Token = "0x6009648")]
|
||||
[Address(RVA = "0x1E3A1F0", Offset = "0x1E38BF0", VA = "0x181E3A1F0")]
|
||||
static DrbgUtilities()
|
||||
{
|
||||
IDictionary dictionary = Platform.CreateHashtable();
|
||||
}
|
||||
|
||||
// Token: 0x06009649 RID: 38473 RVA: 0x00215930 File Offset: 0x00213B30
|
||||
[Token(Token = "0x6009649")]
|
||||
[Address(RVA = "0x1E39AA0", Offset = "0x1E384A0", VA = "0x181E39AA0")]
|
||||
internal static int GetMaxSecurityStrength(IDigest d)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600964A RID: 38474 RVA: 0x00215944 File Offset: 0x00213B44
|
||||
[Token(Token = "0x600964A")]
|
||||
[Address(RVA = "0x1E39B70", Offset = "0x1E38570", VA = "0x181E39B70")]
|
||||
internal static int GetMaxSecurityStrength(IMac m)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600964B RID: 38475 RVA: 0x00215960 File Offset: 0x00213B60
|
||||
[Token(Token = "0x600964B")]
|
||||
[Address(RVA = "0x1E39C70", Offset = "0x1E38670", VA = "0x181E39C70")]
|
||||
internal static byte[] HashDF(IDigest digest, byte[] seedMaterial, int seedLength)
|
||||
{
|
||||
byte[] array = new byte[seedMaterial];
|
||||
byte[] array2 = new byte[array.Length];
|
||||
int num = 0;
|
||||
if (num < digest)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
num += num;
|
||||
num++;
|
||||
num += num;
|
||||
num++;
|
||||
num += num;
|
||||
num++;
|
||||
num += num;
|
||||
num++;
|
||||
int num2 = seedMaterial.Length;
|
||||
uint num3;
|
||||
if (num < (int)num3)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
if (num < num2)
|
||||
{
|
||||
num += num;
|
||||
num++;
|
||||
}
|
||||
int num4 = array2.Length;
|
||||
num2 = num4;
|
||||
int num5 = array.Length;
|
||||
num5 -= num2;
|
||||
if (num5 <= num4)
|
||||
{
|
||||
num4 = num5;
|
||||
}
|
||||
int num6 = 0;
|
||||
Array.Copy(array2, num6, array, num2, num4);
|
||||
if (seedLength != 0)
|
||||
{
|
||||
uint num7;
|
||||
num7 -= (uint)seedLength;
|
||||
int length = array.Length;
|
||||
if (num != length)
|
||||
{
|
||||
num++;
|
||||
byte b;
|
||||
b += b;
|
||||
b = (byte)((int)b + seedLength);
|
||||
b += b;
|
||||
b = (byte)((int)b + seedLength);
|
||||
b += b;
|
||||
b = (byte)((int)b + seedLength);
|
||||
b += b;
|
||||
b = (byte)((int)b + seedLength);
|
||||
b += b;
|
||||
b = (byte)((int)b + seedLength);
|
||||
b += b;
|
||||
b = (byte)((int)b + seedLength);
|
||||
b += b;
|
||||
b = (byte)((int)b + seedLength);
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x0600964C RID: 38476 RVA: 0x00215A84 File Offset: 0x00213C84
|
||||
[Token(Token = "0x600964C")]
|
||||
[Address(RVA = "0x1E3A1E0", Offset = "0x1E38BE0", VA = "0x181E3A1E0")]
|
||||
internal static bool IsTooLarge(byte[] bytes, int maxBytes)
|
||||
{
|
||||
if (bytes == 0)
|
||||
{
|
||||
}
|
||||
return bytes.Length > maxBytes;
|
||||
}
|
||||
|
||||
// Token: 0x0600964D RID: 38477 RVA: 0x00215AA0 File Offset: 0x00213CA0
|
||||
[Token(Token = "0x600964D")]
|
||||
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
||||
public DrbgUtilities()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0400633E RID: 25406
|
||||
[Token(Token = "0x400633E")]
|
||||
private static readonly IDictionary maxSecurityStrengths;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user