charsets
This commit is contained in:
@@ -95,6 +95,11 @@ TEMPLATES=(
|
||||
| `{num:N}` | N digits | ~3.3 bits/char |
|
||||
| `{special:N}` | N from `!?@#%~=+` | ~3.0 bits/char |
|
||||
| `{NAME:N-M}` | N to M chars from charset NAME | log2(Σ size^L) |
|
||||
| `{hex:N}` | `3f9a` | 4.0 bits/char |
|
||||
| `{b58:N}` | `Vk2x` (Base58, no 0OIl) | ~5.9 bits/char |
|
||||
| `{b64:N}` | `hG_4` (URL-safe base64) | 6.0 bits/char |
|
||||
| `{alnum:N}` | `xR4x` | ~6.0 bits/char |
|
||||
| `{ascii:N}` | `p/(!` (all printable, no space) | ~6.5 bits/char |
|
||||
|
||||
\* Word entropy depends on pool size. Values shown assume all built-in lists enabled (~14k words, ~13.8 bits/word).
|
||||
|
||||
@@ -109,7 +114,7 @@ CHARSETS=(
|
||||
)
|
||||
```
|
||||
|
||||
Names must match `[a-z][a-z0-9_]*` and override the built-in four (alpha, safe, num, special). Avoid duplicate characters; himi warns if it sees them, since they skew the distribution and overstate entropy.
|
||||
Names must match `[a-z][a-z0-9_]*` and override any built-in of the same name (alpha, safe, num, special, hex, b58, b64, alnum, ascii). Avoid duplicate characters; himi warns if it sees them, since they skew the distribution and overstate entropy.
|
||||
|
||||
Range tokens pick the length weighted by `size^L`, so every possible output is equally likely. `{num:1-2}` covers 0-99 plus 0-9 (110 outcomes, ~6.8 bits), not a 50/50 coin flip on length, which would tank min-entropy.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user