summaryrefslogtreecommitdiff
path: root/rg.1
diff options
context:
space:
mode:
authorbryan <bryan@veltar.systems>2026-08-26 15:16:23 +0200
committerbryan <bryan@veltar.systems>2026-08-26 15:16:23 +0200
commit22ade138c4e83b7c0b0c702c38c0ca00a9948d4b (patch)
treef78768a69dded978be14aa4290b198903b27f4c0 /rg.1
parentdfce501af03595a8fb5083fbc43b48d729ae9551 (diff)
downloadrg-22ade138c4e83b7c0b0c702c38c0ca00a9948d4b.tar.gz
rg-22ade138c4e83b7c0b0c702c38c0ca00a9948d4b.zip
Replace the placeholder with a suckless C rg.
rg prints n cryptographically random strings of length l, matching rg.veltar.systems. Bytes come from getrandom(2) on Linux and rand_s on Windows. make selects clang and .exe when OS=Windows_NT.
Diffstat (limited to 'rg.1')
-rw-r--r--rg.155
1 files changed, 55 insertions, 0 deletions
diff --git a/rg.1 b/rg.1
new file mode 100644
index 0000000..dc54684
--- /dev/null
+++ b/rg.1
@@ -0,0 +1,55 @@
+.TH RG 1 rg-VERSION
+.SH NAME
+rg \- generate random strings
+.SH SYNOPSIS
+.B rg
+.RB [ \-v ]
+.RB [ \-n
+.IR n ]
+.RB [ \-l
+.IR l ]
+.SH DESCRIPTION
+.B rg
+prints
+.I n
+cryptographically random strings of length
+.I l
+drawn from a configurable alphabet. Defaults match
+rg.veltar.systems:
+.I n
+= 6,
+.I l
+= 10, alphabet A–Z a–z 0–9.
+.P
+Bytes come from the OS CSPRNG
+.RI ( getrandom
+on Linux,
+.I rand_s
+on Windows). Incomplete last buckets of 2^32 are rejected so each
+symbol is equiprobable.
+.SH OPTIONS
+.TP
+.BI \-n " n"
+Number of strings. Default 6. Range 1..1000.
+.TP
+.BI \-l " l"
+Length of each string. Default 10. Range 1..256.
+.TP
+.B \-v
+Print version and exit.
+.SH CONFIGURATION
+The alphabet, defaults, and limits live in
+.IR config.h ,
+copied from
+.I config.def.h
+by
+.BR make .
+Edit
+.I config.def.h
+and rebuild. Do not edit
+.I rg.c
+for configuration.
+.SH SEE ALSO
+.IR getrandom (2)
+.SH AUTHORS
+See LICENSE for copyright details.