Code RoomPassword hashing and verification spec
HardPrep Room Coding #4155

Password hashing and verification spec

Vibe & agenticSecurityAlgorithms & data structuresSenior–Staff~18 min

You're asking an AI agent to implement password storage and verification for a TypeScript/Node auth service. Write the spec that gets it right and keeps you out of the next breach post-mortem. What library, algorithm, and parameters do you mandate, what must NEVER be hand-rolled, and what acceptance criteria prove the comparison and hashing are safe? Then describe what a naive prompt ('hash and check the user's password') tends to produce.

Implement
audit_password_records(records: list[str]) → list[str]
Examples
in[["argon2id|3|65536|s1","sha256|1|0|s2"]]out["ok","weak_algorithm"]
in[["bcrypt|12|0|s1","bcrypt|10|0|s2"]]out["ok","weak_parameters"]
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 18 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.