encfields

package
v0.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 7 Imported by: 0

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

View Source
var StaticFS embed.FS

Functions

func DecryptPage

func DecryptPage(basePath string) templ.Component

func EncryptPage

func EncryptPage(basePath string) templ.Component

func Register

func Register(r tool.Router)

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

func SetService(s *enc.Service)

SetService wires in the enc.Service the handlers will use. Call once from server.go after enc.New.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL