Add RandomHexString for unguessable identifiers and tokens #14

Merged
sneak merged 1 commits from clawbot/util:proposal-random-hex-string into master 2026-09-05 05:44:24 +02:00

1 Commits

Author SHA1 Message Date
4937903190 add RandomHexString for unguessable identifiers and tokens
RandomHexString returns the requested number of bytes from crypto/rand as
lowercase hexadecimal, so callers reaching for a token do not end up using the
predictable math/rand instead. Comes with a doc comment and table-driven tests.
(closes #13)

Model: opus-5
2026-09-05 03:28:27 +00:00