libnick 2024.12.0
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)
 Constructs a PasswordGenerator.
 
PasswordContent getContentFlags () const
 Gets the flags of possible characters in a generated password.
 
void setContentFlags (PasswordContent contentFlags)
 Sets the flags of possible characters in a generated password.
 
std::string next (size_t length=16)
 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)

Constructs a PasswordGenerator.

Parameters
contentFlagsFlags of possible characters in a generated password

Member Function Documentation

◆ getContentFlags()

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

Gets the flags of possible characters in a generated password.

Returns
The flags of possible characters in a generated password

◆ next()

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

Generates a new password.

Parameters
lengthThe length of the generated password
Returns
The generated password

◆ setContentFlags()

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

Sets the flags of possible characters in a generated password.

Parameters
contentFlagsFlags of possible characters in a generated password

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