functionality for charsets added
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
# secret config — source'd by the secret command
|
||||
# Location: ~/.config/himi/config.sh
|
||||
|
||||
# Schema version — himi nags if this is older than what it expects.
|
||||
# After merging new options into an existing config, bump this to match.
|
||||
CONFIG_VERSION=2
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Character sets for random portions
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -11,6 +15,17 @@ SAFE_CHARSET='ACDEFGHJKMNPQRTWXY234679'
|
||||
NUM_CHARSET='0123456789'
|
||||
SPECIAL_CHARSET='!?@#%~=+'
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Custom charsets (optional)
|
||||
# Format: "name|characters" — use as {name:N} or {name:N-M} in templates.
|
||||
# Names: lowercase, matching [a-z][a-z0-9_]*. Entries here override the
|
||||
# built-in four. Avoid duplicate characters (skews the distribution).
|
||||
# ------------------------------------------------------------------------------
|
||||
CHARSETS=(
|
||||
# "hex|0123456789abcdef"
|
||||
# "b58|123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
|
||||
)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Word filtering (applied when building pool.txt)
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -27,10 +42,9 @@ WORD_MAX_LENGTH=9
|
||||
# {Word} — random word (Title Case)
|
||||
# {word!} — random lower or UPPER (+1 bit entropy)
|
||||
# {Word!} — random lower/Title/UPPER (+1.58 bits entropy)
|
||||
# {alpha:N} — N chars, Crockford Base32 (5.0 bits/char)
|
||||
# {safe:N} — N chars, ultra-safe (4.6 bits/char)
|
||||
# {num:N} — N digits (3.3 bits/char)
|
||||
# {special:N} — N characters from SPECIAL_CHARSET
|
||||
# {NAME:N} — N chars from charset NAME (alpha/safe/num/special/custom)
|
||||
# {NAME:N-M} — N to M chars, weighted so every output is equally likely
|
||||
# (entropy = log2 of total outcomes, e.g. {num:1-2} ≈ 6.8 bits)
|
||||
# ------------------------------------------------------------------------------
|
||||
TEMPLATES=(
|
||||
"default|{word!}{num:2}-{word!}{num:2}-{alpha:3}{num:2}"
|
||||
|
||||
Reference in New Issue
Block a user