class
Pwgen::RandomGenerator
- Pwgen::RandomGenerator
- Pwgen::Generator
- Reference
- Object
Overview
Generates completely random passwords using secure random number generation.
This generator creates passwords by randomly selecting characters from
a pool based on the specified feature flags. It ensures cryptographic
security by using Random::Secure.
Defined in:
pwgen/random_generator.crInstance Method Summary
-
#generate(length : Int32, flags : Feature, remove : String | Nil) : String
Generates a random password.
Instance methods inherited from class Pwgen::Generator
generate(length : Int32, flags : Feature, remove : String | Nil) : String
generate
Instance Method Detail
Generates a random password.
length: Length of the password (must be positive)flags: Feature flags (Digits, Uppers, Symbols, Ambiguous, NoVowels)remove: Optional string of characters to exclude
Raises Pwgen::Error if parameters are invalid or if the character pool
becomes empty after removals.