mirror of
https://github.com/rustomax/nim-passgen
synced 2026-01-09 06:31:17 +00:00
No description
|
|
||
|---|---|---|
| docs | ||
| src | ||
| tests | ||
| .gitignore | ||
| .travis.yml | ||
| LICENSE | ||
| passgen.nimble | ||
| README.md | ||
nim-passgen
Password generation library in Nim
Installation
nimble install passgen
Example
# 24 character-long password,
# inluding letters, numbers and special characters
let pg = newPassGen(passlen = 24)
echo "Long: ", pg.getPassword()
# 8 character-long password,
# inluding letters and numbers only (no special characters)
pg = newPassGen(passlen = 8, flags={fUpper, fLower, fDigits})
echo "Short: ", pg.getPassword()
# 4 character-long numerical PIN
pg = newPassGen(passlen = 4, flags={fDigits})
echo "PIN: ", pg.getPassword()