MCPcopy
hub / github.com/umami-software/umami / hashPassword

Function hashPassword

src/lib/password.ts:5–7  ·  view source on GitHub ↗
(password: string, rounds = SALT_ROUNDS)

Source from the content-addressed store, hash-verified

3const SALT_ROUNDS = 10;
4
5export function hashPassword(password: string, rounds = SALT_ROUNDS) {
6 return bcrypt.hashSync(password, rounds);
7}
8
9export function checkPassword(password: string, passwordHash: string) {
10 return bcrypt.compareSync(password, passwordHash);

Callers 3

POSTFunction · 0.90
POSTFunction · 0.90
POSTFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected