passgen

Password generation library in Nim

Pure Nim score 30/100 · tests present · docs generated

Summary

Latest Version Unknown
License MIT
CI Status Passing
Downloads 0
Last Indexed 2026-07-21 05:24

Installation

nimble install passgen
choosenim install passgen
git clone https://github.com/rustomax/nim-passgen

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
passgen - - - - - - -

Source

Repository https://github.com/rustomax/nim-passgen
Homepage https://github.com/rustomax/nim-passgen
Documentation View Documentation
Registry Source nimble_official

README

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()