attemptcode

package
v0.239.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package attemptcode is a team host's ATTEMPT CODE (team sharing 2b.2 follow-up; internal/mirror's teamhold.go): drawn by muster-mirror, checked by the hub, shown by `muster doctor`. 🔴 A LEAF: it imports only the standard library, so the CLI links it without the mirror package.

Index

Constants

View Source
const Header = "X-Muster-Attempt-Code"

Header carries a muster-mirror process's attempt code on /mirror/connect, and on `muster doctor`'s GET /mirror/host.

Variables

This section is empty.

Functions

func Fingerprint

func Fingerprint(h [32]byte) string

Fingerprint is the short hex that logs and audit rows carry for a code's hash: an HMAC under a per-process random key (#688 round 1, Z1), so it matches a log line to an audit row written by the SAME server process, and a log or audit reader cannot test guesses against it offline.

func Hash

func Hash(code string) ([32]byte, bool)

Hash is the hash the hub keeps of a code (canonical or as typed), and false for a malformed one.

func New

func New() string

New is a fresh random attempt code in its typeable form, XXXX-XXXX-XXXX (60 bits from crypto/rand).

func Normalize

func Normalize(code string) (string, bool)

Normalize is code's canonical form — upper case, without the dashes and spaces a person types — and whether it is a well-formed code at all. The look-alikes Crockford folds (I and L to 1, O to 0) are folded.

Types

This section is empty.

Jump to

Keyboard shortcuts

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