Preserve modern generic named hash dispatch and cleanup
ProprietaryReplace resolved obsolete modern HashAlgorithm/KeyedHashAlgorithm.Create(string) calls with a private CryptoConfig forwarding helper preserving configured dispatch, single evaluation, null results, checked casts, constructor failures and disposal of incompatible mapped objects before rethrow. A throwing Dispose retains precedence. Require modern Obsolete metadata; Framework bindings remain unchanged because their cleanup contract differs. Keep named/commented/unresolved calls, initializers, constructors, lambda/query contexts, partial/generic owners and conditional snapshots for review. Standalone modern-runtime compatibility recipe; no algorithm selection or cleanup on successful dispatch.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net7. UseCryptoConfigForGenericHashFactoriesmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net7. UseCryptoConfigForGenericHashFactoriesInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.