79399530

Date: 2025-01-30 10:24:11
Score: 0.5
Natty:
Report link

It was pointed out that subtle is actually undefined.

I replaced my function with this code and it now works (and is nicer as it just returns a string not a Promise<String>:

export default function hashPassword(unHashedPassword) {
    const hash = crypto.createHash("sha256")
    return hash.update(unHashedPassword).digest().toString("hex")
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Kris Rice