Use the AES factory for closed CBC transform scopes

Proprietary

Replace a parameterless inferred AesCryptoServiceProvider using resource with Aes.Create() only when all references are attributed KeySize/BlockSize receivers or two-argument CreateEncryptor/CreateDecryptor receivers. Preserve arguments, order, default CBC policy and disposal, retyping the local and members. Exclude mode/feedback observations, escapes, captures, async/iterators, identity and conditional snapshots. Standalone modern-.NET modernization; no historical Framework CSP/FIPS equivalence assertion.

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

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