Use the same hash factory in a using scope with explicit resets

Proprietary

Replace known parameterless MD5 CSP or SHA Managed/CSP construction in a closed using block or declaration with its same-algorithm factory, retaining ComputeHash and explicit Initialize calls with the actual BCL reset descriptor. Retain optional direct terminal Clear/Dispose and existing using disposal. Skip post-cleanup use, nested cleanup, state/streaming operations, identity, escape/capture, async/iterators and conditional snapshots. Opt-in modern-.NET compatibility port; no algorithm, encoding or format change.

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

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