Code Room
CodingEasy
Question
Compute a salted SHA-256 digest for password storage. Given a `password` and a `salt` (both strings), return the lowercase hex SHA-256 digest of the salt concatenated BEFORE the password (i.e. hash of salt + password), both UTF-8 encoded. Return the 64-character hex string.
Implement
salted_digest(password: str, salt: str) → strExamples
in
["pass","s4lt"]out"e3b5bc3bd05bb8579aa0695bd9606fd5fb7a12fea904bb09fb2ecea441f2c067"What a strong answer looks like
State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Learn the concepts
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.
Run or narrate your approach, then ask the coach.