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

Function isEncryptedKey

apps/sim/lib/api-key/auth.ts:29–32  ·  view source on GitHub ↗
(storedKey: string)

Source from the content-addressed store, hash-verified

27 * @returns true if the key is encrypted, false if it's plain text
28 */
29export function isEncryptedKey(storedKey: string): boolean {
30 // Check if it follows the encrypted format: iv:encrypted:authTag
31 return storedKey.includes(':') && storedKey.split(':').length === 3
32}
33
34/**
35 * Encrypts an API key for secure storage

Callers 3

auth.test.tsFile · 0.90
getApiKeyDisplayFormatFunction · 0.70
getEncryptedApiKeyLast4Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected