Use factory method for abstract cryptographic types

Proprietary

Replace new AbstractCryptoType() with AbstractCryptoType.Create() for abstract cryptographic types like SHA256, Aes, RandomNumberGenerator, etc. These types are abstract and cannot be instantiated directly; callers must use the static Create() factory method.

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

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