Fixed one warning for Umbraco.Infrastructure . 'AesCryptoServiceProvider' is obsolete.

This commit is contained in:
Zeb Sadiq
2023-11-02 14:31:42 +00:00
committed by Michael Latouche
parent 7a57e8861d
commit 7b0ae3c5d9

View File

@@ -131,7 +131,9 @@ public class MemberPasswordHasher : UmbracoPasswordHasher<MemberIdentityUser>
switch (algorithmName)
{
case "AES":
algorithm = new AesCryptoServiceProvider { Key = StringToByteArray(decryptionKey), IV = new byte[16] };
algorithm = Aes.Create();
algorithm.Key = StringToByteArray(decryptionKey);
algorithm.IV = new byte[16];
break;
default:
throw new NotSupportedException($"The algorithm ({algorithmName}) is not supported");