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

Method decryptKey

apps/web/services/api-keys.ts:5–10  ·  view source on GitHub ↗
({ token }: { token: string })

Source from the content-addressed store, hash-verified

3
4export class ApiKeysService {
5 private static decryptKey({ token }: { token: string }) {
6 const hash = createHash('sha256')
7 .update(`${token}${process.env.NEXTAUTH_SECRET}`)
8 .digest('hex');
9 return hash;
10 }
11
12 private static createKey() {
13 const token = randomBytes(64).toString('hex');

Callers 1

getAccountByApiKeyMethod · 0.95

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected