Documentation
¶
Index ¶
- func Hash(token string) string
- func KeyedHash(key, value []byte) string
- func Keyfile() (string, error)
- func Password() (string, error)
- func RandomString(length int) (string, error)
- func SCRAMVerifier(password string) (string, error)
- func Token() (string, error)
- type Sealer
- func (s *Sealer) Fingerprint() string
- func (s *Sealer) IdempotencyBodyHash(body []byte) string
- func (s *Sealer) IdempotencyIdentityHash(scope []byte) string
- func (s *Sealer) MCPConfirmationHash(value []byte) string
- func (s *Sealer) MCPIdempotencyHash(value []byte) string
- func (s *Sealer) Open(value string) ([]byte, error)
- func (s *Sealer) OpenFor(identity, value string) ([]byte, error)
- func (s *Sealer) Seal(plaintext []byte) (string, error)
- func (s *Sealer) SealFor(identity string, plaintext []byte) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyedHash ¶ added in v0.2.0
KeyedHash returns a versioned HMAC-SHA256 receipt. Callers must use a secret high-entropy key and domain-separate values when sharing a credential key.
func RandomString ¶
RandomString generates unbiased alphanumeric characters using crypto/rand.
func SCRAMVerifier ¶ added in v0.2.0
SCRAMVerifier derives a PostgreSQL verifier so plaintext passwords never enter SQL.
Types ¶
type Sealer ¶
type Sealer struct {
// contains filtered or unexported fields
}
Sealer encrypts secrets and authenticates idempotency digests with separate master-key-derived keys.
func (*Sealer) Fingerprint ¶ added in v0.4.0
Fingerprint identifies a master key without exposing encryption key material.
func (*Sealer) IdempotencyBodyHash ¶
IdempotencyBodyHash prevents offline guessing of password-bearing JSON bodies from a database copy without the installation's master key.
func (*Sealer) IdempotencyIdentityHash ¶
IdempotencyIdentityHash hides caller-provided retry keys using a separate key.
func (*Sealer) MCPConfirmationHash ¶ added in v0.3.0
MCPConfirmationHash authenticates MCP confirmation state with a dedicated key.
func (*Sealer) MCPIdempotencyHash ¶ added in v0.3.0
MCPIdempotencyHash derives retry identities independently of confirmation state.