MCPcopy Index your code
hub / github.com/supermemoryai/cloudflare-saas-stack / generateSecureRandomString

Function generateSecureRandomString

scripts/setup.ts:289–294  ·  view source on GitHub ↗
(length: number)

Source from the content-addressed store, hash-verified

287
288// Function to generate secure random 32-character string
289function generateSecureRandomString(length: number): string {
290 return crypto
291 .randomBytes(Math.ceil(length / 2))
292 .toString("hex")
293 .slice(0, length);
294}
295
296// Function to update .dev.vars with secure random string
297async function updateDevVarsWithSecret() {

Callers 1

updateDevVarsWithSecretFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected