Documentation
¶
Overview ¶
Package encoding is a small translation layer over the stdlib encoders used across the Truestamp wire format: hex, base64 (standard, RFC 4648 §4) and base64url (RFC 4648 §5). "Binary" is a pass-through used as the counterpart to any textual encoding when bytes move through stdin/stdout.
The goal is a uniform behaviour across platforms for the `truestamp encode`, `truestamp decode`, and `truestamp convert` sub-commands so users do not have to shell out to `xxd`, `base64`, or similar tools whose flags differ between macOS, BSD, GNU coreutils, and Git-Bash.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrEmptyDecodeInput = errors.New("empty input")
ErrEmptyDecodeInput signals that decode was asked to decode nothing. Returned as an error so callers can surface a clear message; decoders would otherwise silently produce an empty output which hides bugs.
Functions ¶
Types ¶
type Encoding ¶
type Encoding int
Encoding enumerates the supported representations.