https://github.com/karpeleslab/rndstr
Random string functions in Go
https://github.com/karpeleslab/rndstr
Last synced: 12 months ago
JSON representation
Random string functions in Go
- Host: GitHub
- URL: https://github.com/karpeleslab/rndstr
- Owner: KarpelesLab
- License: bsd-3-clause
- Created: 2020-04-26T22:46:18.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-26T23:20:09.000Z (about 6 years ago)
- Last Synced: 2024-06-20T02:00:07.122Z (almost 2 years ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://godoc.org/github.com/KarpelesLab/rndstr)
# Simple random string generator
This allows generating random strings very easily.
```go
fmt.Printf("Random string: %s\n", rndstr.Simple(16, rndstr.Alnum))
// or to generate a secure string, using crypto/rand
secureStr := rndstr.SimpleReader(16, rndstr.Alnum, rand.Reader)
```