libnick 2025.9.1
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
Nickvision::Keyring::PasswordGenerator Class Reference

A random password generator. More...

#include <passwordgenerator.h>

Public Member Functions

 PasswordGenerator (PasswordContent contentFlags=PasswordContent::Numeric|PasswordContent::Uppercase|PasswordContent::Lowercase|PasswordContent::Special|PasswordContent::Space) noexcept
 Constructs a PasswordGenerator.
 
PasswordContent getContentFlags () const noexcept
 Gets the flags of possible characters for the generator to use.
 
void setContentFlags (PasswordContent contentFlags) noexcept
 Sets the flags of possible characters for the generator to use.
 
std::string next (size_t length=16) noexcept
 Generates a new password.
 

Detailed Description

A random password generator.

Constructor & Destructor Documentation

◆ PasswordGenerator()

Nickvision::Keyring::PasswordGenerator::PasswordGenerator ( PasswordContent contentFlags = PasswordContent::Numeric|PasswordContent::Uppercase|PasswordContent::Lowercase|PasswordContent::Special|PasswordContent::Space)
noexcept

Constructs a PasswordGenerator.

Parameters
contentFlagsFlags of possible characters for the generator to use

Member Function Documentation

◆ getContentFlags()

PasswordContent Nickvision::Keyring::PasswordGenerator::getContentFlags ( ) const
noexcept

Gets the flags of possible characters for the generator to use.

Returns
The flags of possible characters for the generator to use

◆ next()

std::string Nickvision::Keyring::PasswordGenerator::next ( size_t length = 16)
noexcept

Generates a new password.

Parameters
lengthThe length of the generated password
Returns
The generated password

◆ setContentFlags()

void Nickvision::Keyring::PasswordGenerator::setContentFlags ( PasswordContent contentFlags)
noexcept

Sets the flags of possible characters for the generator to use.

Parameters
contentFlagsFlags of possible characters for the generator to use

The documentation for this class was generated from the following file: