MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / resolvePasswordHash

Function resolvePasswordHash

packages/server/src/services/auth/password.ts:7–15  ·  view source on GitHub ↗
(
  env: NodeJS.ProcessEnv = process.env,
)

Source from the content-addressed store, hash-verified

5const BCRYPT_COST = 12;
6
7export async function resolvePasswordHash(
8 env: NodeJS.ProcessEnv = process.env,
9): Promise<string | undefined> {
10 const plaintext = env['KIMI_CODE_PASSWORD'];
11 if (!plaintext) {
12 return undefined;
13 }
14 return hash(plaintext, BCRYPT_COST);
15}
16
17export async function verifyPassword(
18 candidate: string,

Callers 3

startServerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected