From efdc3eb7bbdc88fd9c56f00233b36238e4725f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Wed, 4 Sep 2024 22:24:31 +0200 Subject: [PATCH] Misc --- ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs b/ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs index 1a528757be9aa..3bef690d1ddfe 100644 --- a/ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs +++ b/ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs @@ -243,7 +243,9 @@ internal static bool VerifyHash(EHashingMethod hashingMethod, string text, strin try { byte[] key = SHA256.HashData(EncryptionKey); byte[] textData = Encoding.UTF8.GetBytes(text); - byte[] iv = RandomNumberGenerator.GetBytes(16); + + Span iv = stackalloc byte[16]; + RandomNumberGenerator.Fill(iv); using Aes aes = Aes.Create();