MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / generateSecretHash

Function generateSecretHash

packages/server/src/utils/apiKey.ts:17–21  ·  view source on GitHub ↗
(apiKey: string)

Source from the content-addressed store, hash-verified

15 * @returns {string}
16 */
17export const generateSecretHash = (apiKey: string): string => {
18 const salt = randomBytes(8).toString('hex')
19 const buffer = scryptSync(apiKey, salt, 64) as Buffer
20 return `${buffer.toString('hex')}.${salt}`
21}
22
23/**
24 * Verify valid keys

Callers 2

apiKey.test.tsFile · 0.90
createApiKeyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected