MCPcopy Index your code
hub / github.com/coder/code-server / isHashMatch

Function isHashMatch

src/node/util.ts:150–155  ·  view source on GitHub ↗
(password: string, hash: string)

Source from the content-addressed store, hash-verified

148 * Used to verify if the password matches the hash
149 */
150export const isHashMatch = async (password: string, hash: string) => {
151 if (password === "" || hash === "" || !hash.startsWith("$")) {
152 return false
153 }
154 return await argon2.verify(hash, password)
155}
156
157/**
158 * Used to hash the password using the sha256

Callers 2

handlePasswordValidationFunction · 0.85
isCookieValidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected