Skip to content

Commit

Permalink
Modify S2053(C#): Improve code sample (#4452)
Browse files Browse the repository at this point in the history
  • Loading branch information
loris-s-sonarsource authored Oct 30, 2024
1 parent 041d90f commit d662fdf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rules/S2053/csharp/how-to-fix-it/dot-net.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ using System.Security.Cryptography;
public static void hash(string password)
{
var hashed = new Rfc2898DeriveBytes(password, 32, 10000, HashAlgorithmName.SHA256);
var saltSize = 32;
var iterations = 100_000;
var hashed = new Rfc2898DeriveBytes(password, saltSize, iterations, HashAlgorithmName.SHA512);
}
----

Expand Down

0 comments on commit d662fdf

Please sign in to comment.