Skip to content

opencoff/go-words

Repository files navigation

go-words

Go Reference License: Apache 2.0

Go library for generating human-readable representations of binary data and random pronounceable words.

Features

  • Proquint encoding — reversible binary-to-word conversion (0x7f000001lusab-babad)
  • ASCII art fingerprints — drunken bishop visualization (same algorithm as OpenSSH)
  • Random word generation — pronounceable words of exact length via consonant-vowel alternation with optional affixes
  • Phrase generation — multi-word passphrases for tenant IDs, URL slugs, or human-friendly identifiers

Install

go get github.com/opencoff/go-words@latest

Usage

import "github.com/opencoff/go-words"

// Proquint encode/decode
s := words.ToWords([]byte{0x7f, 0x00, 0x00, 0x01}) // "lusab-babad"
b, _ := words.FromWords(s)                          // []byte{0x7f, 0x00, 0x00, 0x01}

// ASCII art fingerprint
fmt.Println(words.ToString(someHash))

// Random pronounceable word (exact length)
w := words.Random(8)

// Multi-word passphrase (4 words × 7 chars, ~95 bits entropy)
phrase := words.Phrase(4, "-", 7) // e.g. "opicaku-aeluzel-zavinal-evedetu"

License

Apache 2.0 — see LICENSE.

About

Go library and CLI for generating pronounceable words, phrases, proquint encoding, and ASCII art fingerprints

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors