HIGH AI PREVALENCE: HIGH auth.csharp.crypto.weak-password-hash
A password is hashed with a fast general-purpose digest (MD5, SHA1, SHA256, SHA512) from System.Security.Cryptography.
Why AI tools produce this: AI coding tools generate this anti-pattern by default, it appears in a large share of AI-written auth code.
Why this matters
These are designed to be fast, which makes offline brute-force and rainbow-table attacks cheap; they are NOT suitable for storing passwords (CWE-916).
Use ASP.NET Core Identity's PasswordHasher<TUser>, or a slow, salted password KDF: PBKDF2 (Rfc2898DeriveBytes with a high iteration count), bcrypt, or Argon2.
VULNERABLE
SAFE
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.csharp.crypto.weak-password-hash -- <reason>