9#ifndef CPPSECURITY_PASSWORD_GENERATOR_H
10#define CPPSECURITY_PASSWORD_GENERATOR_H
14#include "common/flags.h"
34template <
class TOutputStream>
68 size_t length() const noexcept {
return _length; }
83 virtual bool Validate(std::string_view password)
const;
virtual std::password Generate() const
Generate the strong password with the current password requirements.
size_t length() const noexcept
Get the password length.
PasswordGenerator & operator=(const PasswordGenerator &)=default
virtual ~PasswordGenerator()=default
PasswordGenerator(PasswordGenerator &&)=default
PasswordGenerator & operator=(PasswordGenerator &&)=default
virtual bool Validate(std::string_view password) const
Validate the given password with the current password requirements.
PasswordGenerator(const PasswordGenerator &)=default
PasswordFlags flags() const noexcept
Get the password flags.
TOutputStream & operator<<(TOutputStream &stream, CipherAlgorithm algorithm)
PasswordFlags
Password flags.
@ upper
Password must contain alphabet characters in upper case (A-Z)
@ none
Empty password flags.
@ symbols
Password must contain punctuation symbols (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~)
@ lower
Password must contain alphabet characters in lower case (a-z)
@ digits
Password must contain digits (0-9)
Password string definition.
Password generator inline implementation.