Use cryptographic zeroization for complete local byte arrays
ProprietaryReplace exact Array.Clear(local, 0, local.Length) calls for byte-array locals/parameters with CryptographicOperations.ZeroMemory over the same full range. Retain both original reads and the null Length failure. Opt-in: leave fields, properties, slices, named arguments, comments and unresolved symbols unchanged; require explicit vector declarations and skip conditional, closure, ref, unsafe, async or iterator syntax.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UseZeroMemoryForLocalByteArraysmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net6. UseZeroMemoryForLocalByteArraysInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.