MCPcopy
hub / github.com/simstudioai/sim / isEncryptedKey

Function isEncryptedKey

packages/db/scripts/backfill-api-key-hash.ts:38–40  ·  view source on GitHub ↗
(storedKey: string)

Source from the content-addressed store, hash-verified

36const BATCH_SIZE = 500
37
38export function isEncryptedKey(storedKey: string): boolean {
39 return storedKey.includes(':') && storedKey.split(':').length === 3
40}
41
42export function hashApiKey(plainKey: string): string {
43 return createHash('sha256').update(plainKey, 'utf8').digest('hex')

Callers 3

runBackfillFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected