MCPcopy Create free account
hub / github.com/parse-community/parse-server / compare

Function compare

src/password.js:22–28  ·  view source on GitHub ↗
(password, hashedPassword)

Source from the content-addressed store, hash-verified

20// Returns a promise for whether this password compares to equal this
21// hashed password.
22function compare(password, hashedPassword) {
23 // Cannot bcrypt compare when one is undefined
24 if (!password || !hashedPassword) {
25 return Promise.resolve(false);
26 }
27 return bcrypt.compare(password, hashedPassword);
28}
29
30// Pre-computed bcrypt hash (cost factor 10) used for timing normalization.
31// The actual value is irrelevant; it ensures bcrypt.compare() runs with

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…