Implement secure password storage
Store passwords with bcrypt or Argon2, unique salts, and a server-side pepper. Shows the full registration and login flow with timing-safe comparison.
Preview
Copy prompt
Implement secure password storage for a [Language] user authentication system. Use bcrypt or Argon2id with a work factor or time-cost parameter appropriate for your hardware — document how you chose the value. Generate a cryptographically random unique salt per password. Add a server-side pepper sourced from an environment variable as an additional layer. Show the complete registration flow that hashes and stores the password and the login flow that verifies it using a timing-safe comparison function.
More
Security
Prompts
