Use the same hash factory inside an existing using block

Proprietary

Replace parameterless MD5 CSP or SHA1/SHA256/SHA384/SHA512 Managed/CSP construction in using(var hash = new ...) with the same algorithm's Create() factory, retaining disposal and repeated ComputeHash calls. Require all references to be bound BCL ComputeHash receivers. Skip configuration, identity, escapes, other members, captures, async/iterators and conditional snapshots. Opt-in modern-.NET compatibility port; no algorithm strengthening.

OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net6.UseScopedHashFactory
mod run . --recipe=OpenRewrite.Recipes.CSharp.Migration.Dotnet.Net6.UseScopedHashFactory

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.