Files
2026-06-04 11:42:34 +02:00

90 lines
3.0 KiB
C#

using System;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
// Token: 0x02000ED0 RID: 3792
public static class JCMEIAJJPPA
{
// Token: 0x0601F631 RID: 128561 RVA: 0x0088DB38 File Offset: 0x0088BD38
public static byte[] BENOBLIMNHN(byte[] KNLOIPDFHNH, string APKELCKCCLM)
{
byte[] array = JCMEIAJJPPA.EEALADEDPMF();
byte[] array2 = JCMEIAJJPPA.EEALADEDPMF();
Rfc2898DeriveBytes rfc2898DeriveBytes = new Rfc2898DeriveBytes(APKELCKCCLM, array, 1000);
byte[] bytes = rfc2898DeriveBytes.GetBytes(32);
byte[] array4;
using (RijndaelManaged rijndaelManaged = new RijndaelManaged())
{
rijndaelManaged.BlockSize = 256;
rijndaelManaged.Mode = CipherMode.CBC;
rijndaelManaged.Padding = PaddingMode.PKCS7;
using (ICryptoTransform cryptoTransform = rijndaelManaged.CreateEncryptor(bytes, array2))
{
using (MemoryStream memoryStream = new MemoryStream())
{
using (CryptoStream cryptoStream = new CryptoStream(memoryStream, cryptoTransform, CryptoStreamMode.Write))
{
cryptoStream.Write(KNLOIPDFHNH, 0, KNLOIPDFHNH.Length);
cryptoStream.FlushFinalBlock();
byte[] array3 = array;
array3 = array3.Concat(array2).ToArray<byte>();
array3 = array3.Concat(memoryStream.ToArray()).ToArray<byte>();
memoryStream.Close();
cryptoStream.Close();
array4 = array3;
}
}
}
}
return array4;
}
// Token: 0x0601F632 RID: 128562 RVA: 0x0088DC6C File Offset: 0x0088BE6C
public static byte[] CKBNEIHJPNP(byte[] PFMOMNGMPPD, string APKELCKCCLM)
{
byte[] array = PFMOMNGMPPD.Take(32).ToArray<byte>();
byte[] array2 = PFMOMNGMPPD.Skip(32).Take(32).ToArray<byte>();
byte[] array3 = PFMOMNGMPPD.Skip(64).Take(PFMOMNGMPPD.Length - 64).ToArray<byte>();
Rfc2898DeriveBytes rfc2898DeriveBytes = new Rfc2898DeriveBytes(APKELCKCCLM, array, 1000);
byte[] bytes = rfc2898DeriveBytes.GetBytes(32);
byte[] array5;
using (RijndaelManaged rijndaelManaged = new RijndaelManaged())
{
rijndaelManaged.BlockSize = 256;
rijndaelManaged.Mode = CipherMode.CBC;
rijndaelManaged.Padding = PaddingMode.PKCS7;
using (ICryptoTransform cryptoTransform = rijndaelManaged.CreateDecryptor(bytes, array2))
{
using (MemoryStream memoryStream = new MemoryStream(array3))
{
using (CryptoStream cryptoStream = new CryptoStream(memoryStream, cryptoTransform, CryptoStreamMode.Read))
{
byte[] array4 = new byte[array3.Length];
cryptoStream.Read(array4, 0, array4.Length);
memoryStream.Close();
cryptoStream.Close();
array5 = array4;
}
}
}
}
return array5;
}
// Token: 0x0601F633 RID: 128563 RVA: 0x0088DDB4 File Offset: 0x0088BFB4
private static byte[] EEALADEDPMF()
{
byte[] array = new byte[32];
RNGCryptoServiceProvider rngcryptoServiceProvider = new RNGCryptoServiceProvider();
rngcryptoServiceProvider.GetBytes(array);
return array;
}
// Token: 0x04005154 RID: 20820
private const int AOENKMAMADL = 256;
// Token: 0x04005155 RID: 20821
private const int FJEICOPBBPP = 1000;
}