Resolve-DSInternalsWeakHashFile read the whole KHDB with a per-line
PowerShell loop (regex, Trim, Split, ToUpper, comparisons) to decide
whether DSInternals could use it as is, and a second such loop to
rewrite it if not. On the real 1.3 billion-hash KHDB that is the same
hours-long cost the rebuild had before the compiled merge, paid at the
start of every Test-WeakADPasswords run.
- Elysium.KhdbText.Inspect does the check in one pass with the same
rules and messages: invalid content and wrong order throw, legacy
HASH:count entries and duplicates are counted.
- Elysium.KhdbText.WriteNormalized does the rewrite when needed.
- TryParse is shared with the merge's Normalize.
- The resolver announces the file and its size before checking.
- Blank lines now also mark the file as needing normalization; before,
they were handed to DSInternals unchanged.
Measured on pwsh 7 (macOS), 5,000,000 hashes: clean file 1.6 s with no
copy; lowercase "HASH:3" file 13.8 s including the rewrite. 40/40
Pester tests pass; new test covers blank and padded lines. The Windows
PowerShell 5.1 timing on the real KHDB is still to be measured.