package randutil
Import Path
github.com/pion/randutil (on go.dev)
Dependency Relation
imports 6 packages, and imported by 9 packages
Package-Level Type Names (only one)
MathRandomGenerator is a random generator for non-crypto usage.
GenerateString returns ranom string using given set of runes.
It can be used for generating unique ID to avoid name collision.
Caution: DO NOT use this for cryptographic usage.
Intn returns random integer within [0:n).
Uint32 returns random 32-bit unsigned integer.
Uint64 returns random 64-bit unsigned integer.
MathRandomGenerator : math/rand/v2.Source
func NewMathRandomGenerator() MathRandomGenerator
Package-Level Functions (total 3)
CryptoUint64 returns cryptographic random uint64.
GenerateCryptoRandomString generates a random string for cryptographic usage.
NewMathRandomGenerator creates new mathmatical random generator.
Random generator is seeded by crypto random.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |