Documentation
¶
Overview ¶
Package encfields backs /tools/encfields — the in-app form for minting and reversing wick_enc_ tokens. The MCP meta-tools wick_encrypt / wick_decrypt deliberately redirect here rather than running the cipher inline, so plaintext never lands in an LLM context window. Per-user keys (HKDF salted with user.ID) mean only the user who issued a token can decrypt it; admins cannot peek at other users' values.
Submission flow is JSON-only — the form posts via fetch() and renders the result inline, so the browser never reloads. Back from /tools/encfields therefore lands on whatever page the user came from (typically the home grid), not on a stale form state.
templ: version: v0.3.1020
Index ¶
Constants ¶
This section is empty.
Variables ¶
var StaticFS embed.FS
Functions ¶
func DecryptPage ¶
func EncryptPage ¶
func Register ¶
Register mounts the four routes under /tools/encfields. GET serves the page shell; POST is a JSON-only API consumed by encfields.js. Paths are relative — the framework prefixes /tools/encfields.
func SetService ¶
SetService wires in the enc.Service the handlers will use. Call once from server.go after enc.New.
Types ¶
This section is empty.