Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.IO.Compression;
using System.IO.Compression;
using System.Security.Cryptography;
using System.Text;

Expand All @@ -11,7 +11,7 @@
{

// Our cryptographic provider, and the key to be used to encrypt. Note, it NEEDS to be 16 characters or more!
private static AesCryptoServiceProvider cryptoProvider;

Check warning on line 14 in Framework/Intersect.Framework.Core/Compression/GzipCompression.cs

View workflow job for this annotation

GitHub Actions / build

'AesCryptoServiceProvider' is obsolete: 'Derived cryptographic types are obsolete. Use the Create method on the base type instead.' (https://aka.ms/dotnet-warnings/SYSLIB0021)
private static string cryptoKey = "T3ZncHUsIGdueHIgdmcgYmUgeXJuaXIgdmcu";

/// <summary>
Expand All @@ -23,8 +23,8 @@

// Take a few bytes out of this delicious morsel and grow stronk.
var keyBytes = ASCIIEncoding.ASCII.GetBytes(cryptoKey);
cryptoProvider.Key = keyBytes.Take(16).ToArray();
cryptoProvider.IV = keyBytes.Reverse().Take(16).ToArray();
cryptoProvider.Key = [.. keyBytes.Take(16)];
cryptoProvider.IV = [.. ((IEnumerable<byte>)keyBytes).Reverse().Take(16)];
}

/// <summary>
Expand Down
Loading