hash

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package hash implements the `unum hash` subcommand — a deterministic deriver that maps any string to a stable set of useful values.

Package hash implements the unum hash subcommand — a deterministic deriver that maps any string to a stable set of useful values via SHA256.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendHistory

func AppendHistory(input string) error

AppendHistory adds input to the history file, capping at maxHistory entries.

func Command

func Command(globalNoColor *bool, globalQuiet *bool) *cobra.Command

Command returns the cobra command for `unum hash`.

Types

type HistoryEntry

type HistoryEntry = types.HistoryEntry

HistoryEntry is an alias for types.HistoryEntry so callers can use hash.HistoryEntry directly.

func LoadHistory

func LoadHistory() []HistoryEntry

LoadHistory reads the history file and returns entries newest-first. Returns an empty slice if the file is absent or malformed.

type Result

type Result = types.Result

Result is an alias for types.Result so callers can use hash.Result directly.

func Derive

func Derive(input string) Result

Derive hashes input with SHA256 and derives all Result fields from the bytes.

Directories

Path Synopsis
render
static
Package static renders hash derivation results to a terminal writer.
Package static renders hash derivation results to a terminal writer.
tui
Package tui provides a Bubble Tea TUI for the hash derivation tool.
Package tui provides a Bubble Tea TUI for the hash derivation tool.
web
Package web provides the HTTP server for the unum hash web UI.
Package web provides the HTTP server for the unum hash web UI.
Package types defines the shared data types for the hash tool.
Package types defines the shared data types for the hash tool.

Jump to

Keyboard shortcuts

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