MCPcopy Create free account
hub / github.com/QuantiaAI/helm-agents / decrypt

Method decrypt

apps/api/src/lib/key-cipher.ts:35–40  ·  view source on GitHub ↗
(blob: string)

Source from the content-addressed store, hash-verified

33 }
34
35 decrypt(blob: string): string {
36 const { iv, tag, ct } = JSON.parse(blob) as { iv: string; tag: string; ct: string };
37 const d = createDecipheriv("aes-256-gcm", this.key, Buffer.from(iv, "base64"));
38 d.setAuthTag(Buffer.from(tag, "base64"));
39 return Buffer.concat([d.update(Buffer.from(ct, "base64")), d.final()]).toString("utf8");
40 }
41}

Callers 2

runHealthChecksFunction · 0.95
envMapMethod · 0.80

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected