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

Function getEncryptionKey

apps/sim/lib/core/security/encryption.ts:9–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7const logger = createLogger('Encryption')
8
9function getEncryptionKey(): Buffer {
10 const key = env.ENCRYPTION_KEY
11 if (!key || key.length !== 64) {
12 throw new Error('ENCRYPTION_KEY must be set to a 64-character hex string (32 bytes)')
13 }
14 return Buffer.from(key, 'hex')
15}
16
17/**
18 * Encrypts a secret using AES-256-GCM with the app's `ENCRYPTION_KEY`.

Callers 2

encryptSecretFunction · 0.85
decryptSecretFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected