Archived
1
1

Refactor and cleanup

This commit is contained in:
Mona Lassa
2025-05-22 02:52:38 +02:00
parent f90695dfda
commit 5ae6b4da9a
12 changed files with 215 additions and 333 deletions
@@ -6,13 +6,13 @@ namespace MetroUnlocker.LibTSForge.Crypto
{
public static class CryptoUtils
{
public static byte[] GenerateRandomKey(int len)
public static byte[] GenerateRandomKey(int length)
{
byte[] rand = new byte[len];
Random r = new Random();
r.NextBytes(rand);
byte[] randomKey = new byte[length];
Random random = new Random();
random.NextBytes(randomKey);
return rand;
return randomKey;
}
public static byte[] AESEncrypt(byte[] data, byte[] key)