MCPcopy Create free account
hub / github.com/PostHog/duckgres / Cipher

Struct Cipher

server/usersecrets/crypto.go:24–26  ·  view source on GitHub ↗

Cipher seals and opens user secret statements with AES-256-GCM. The (org, user, name) row key is bound in as additional authenticated data, so a ciphertext copied onto another row fails to decrypt.

Source from the content-addressed store, hash-verified

22// (org, user, name) row key is bound in as additional authenticated data, so
23// a ciphertext copied onto another row fails to decrypt.
24type Cipher struct {
25 aead cipher.AEAD
26}
27
28// NewCipher builds a Cipher from a base64-encoded (std or url, padded or raw)
29// 32-byte key.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected