← All recipes
Moderne licensed

Find insecure Rfc2898DeriveBytes constructors (SYSLIB0041)

Recipe IDOpenRewrite.Recipes.CSharp.Migration.Dotnet.Net7.FindRfc2898InsecureCtorsArtifactOpenRewrite.Recipes.CSharp.Migration.Dotnet

Finds Rfc2898DeriveBytes constructor calls that use default SHA1 or low iteration counts, which are obsolete in .NET 7 (SYSLIB0041). Specify HashAlgorithmName and at least 600,000 iterations.

Single recipesearchdotnetnet7cryptographyProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net7.FindRfc2898InsecureCtors

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.Migration.Dotnet