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

Function encryptSecret

apps/sim/lib/core/security/encryption.ts:22–24  ·  view source on GitHub ↗
(secret: string)

Source from the content-addressed store, hash-verified

20 * @returns A promise resolving to the encrypted value (`iv:ciphertext:authTag`) and the IV.
21 */
22export async function encryptSecret(secret: string): Promise<{ encrypted: string; iv: string }> {
23 return encrypt(secret, getEncryptionKey())
24}
25
26/**
27 * Decrypts a secret previously produced by {@link encryptSecret}. Logs and

Callers 15

upsertFileShareFunction · 0.90
performUpdateCredentialFunction · 0.90
performChatDeployFunction · 0.90
utils.test.tsFile · 0.90
encryption.test.tsFile · 0.90
encryptCredentialsFunction · 0.90
upsertPersonalEnvVarsFunction · 0.90
upsertWorkspaceEnvVarsFunction · 0.90
encryptTokensFunction · 0.90
encryptClientInformationFunction · 0.90
saveCodeVerifierFunction · 0.90
performCreateMcpServerFunction · 0.90

Calls 2

encryptFunction · 0.90
getEncryptionKeyFunction · 0.85

Tested by

no test coverage detected