pub fn generate_random_password() -> PasswordExpand description
Generate a cryptographically secure MySQL-compatible password.
Design rationale:
rand::rng(): thread-local CSPRNG seeded from the OS and periodically reseeded — suitable for secrets in rand 0.9 (directOsRngno longer implements the high-levelRngtrait required bychoose/shuffle)choose: avoids modulo bias — uniform distribution- Explicit class inclusion: satisfies
MySQLvalidate_passwordMEDIUM policy - Shuffle: removes structural bias from fixed positions
The generated password is 32 characters long and always contains at least one lowercase letter, one uppercase letter, one digit, and one symbol.
§Panics
Panics if any character set constant is empty, which cannot happen in practice as they are defined as non-empty byte string literals.