This commit is contained in:
Łukasz Domeradzki 2024-09-04 22:24:31 +02:00
parent c0da86e4ca
commit efdc3eb7bb
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA

View file

@ -243,7 +243,9 @@ public static class ArchiCryptoHelper {
try {
byte[] key = SHA256.HashData(EncryptionKey);
byte[] textData = Encoding.UTF8.GetBytes(text);
byte[] iv = RandomNumberGenerator.GetBytes(16);
Span<byte> iv = stackalloc byte[16];
RandomNumberGenerator.Fill(iv);
using Aes aes = Aes.Create();