Use same-algorithm factories in explicitly typed hash using blocks
ProprietaryReplace an explicitly typed parameterless MD5 CSP or SHA1/SHA256/SHA384/SHA512 Managed/CSP using resource with the same algorithm's abstract type and Create() factory. Retain the disposal block and repeated bound BCL ComputeHash calls. Leave configuration/identity members, escapes, captures, nullable or commented type syntax and conditional snapshots unchanged. Opt-in modern-.NET compatibility port; no algorithm strengthening.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UseExplicitScopedHashFactorymod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UseExplicitScopedHashFactoryInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.