Use the same hash factory in a streaming hash using block

Proprietary

Replace a parameterless MD5 CSP or SHA Managed/CSP using resource with its same-algorithm factory when its closed block uses inherited TransformBlock/TransformFinalBlock and reads Hash/HashSize. Retain transforms, output copying, state reads, errors, arguments and disposal. Require a final transform and state read; skip reset/configuration, explicit cleanup, escapes/captures, initialization, async/iterators and snapshots. Opt-in modern-.NET compatibility; no format or algorithm change.

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

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