MCPcopy
hub / github.com/RedPlanetHQ/core / hashKey

Function hashKey

packages/cli/src/server/api/auth.ts:5–7  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

3import {getPreferences} from '@/config/preferences';
4
5export function hashKey(key: string): string {
6 return createHash('sha256').update(key).digest('hex');
7}
8
9export function generateSecurityKey(): string {
10 return `gwk_${randomBytes(32).toString('base64url')}`;

Callers 3

bootstrapFromEnvFunction · 0.90
runRegisterFunction · 0.90
verifySecurityKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected