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

Function generatePassword

src/node/util.ts:134–138  ·  view source on GitHub ↗
(length = 24)

Source from the content-addressed store, hash-verified

132}
133
134export const generatePassword = async (length = 24): Promise<string> => {
135 const buffer = Buffer.alloc(Math.ceil(length / 2))
136 await util.promisify(crypto.randomFill)(buffer)
137 return buffer.toString("hex").substring(0, length)
138}
139
140/**
141 * Used to hash the password.

Callers 2

cli.test.tsFile · 0.90
readConfigFileFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected