MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / generateHash

Function generateHash

packages/factory/src/create/auth.ts:9–13  ·  view source on GitHub ↗
(password: string, salt: string)

Source from the content-addressed store, hash-verified

7}
8// dup from utilities to avoid circular dependency
9function generateHash(password: string, salt: string): string {
10 const hash = createHmac('sha512', salt);
11 hash.update(password);
12 return hash.digest('hex');
13}
14
15export default function createAuth(options?: Partial<auths>): Promise<auths> {
16 const password = options?.password || 'password';

Callers 1

createAuthFunction · 0.70

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected