MCPcopy Index your code
hub / github.com/simstudioai/sim / hashApiKey

Function hashApiKey

packages/db/scripts/backfill-api-key-hash.ts:42–44  ·  view source on GitHub ↗
(plainKey: string)

Source from the content-addressed store, hash-verified

40}
41
42export function hashApiKey(plainKey: string): string {
43 return createHash('sha256').update(plainKey, 'utf8').digest('hex')
44}
45
46function decryptApiKey(encryptedValue: string, apiEncryptionKey: string): string {
47 const parts = encryptedValue.split(':')

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected