libnick 2024.12.0
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
Nickvision::Keyring Namespace Reference

Namespaces

namespace  SystemCredentials
 

Classes

class  Credential
 A model of a credential stored in a keyring. More...
 
class  Keyring
 A model of a keyring object for managing credentials. More...
 
class  PasswordGenerator
 A random password generator. More...
 

Enumerations

enum class  CredentialCheckStatus { Valid = 1 , EmptyName = 2 , EmptyUsernamePassword = 4 , InvalidUri = 8 }
 Flags to describe the status of a validated credential. More...
 
enum class  PasswordContent { Numeric = 1 , Uppercase = 2 , Lowercase = 4 , Special = 8 }
 Flags to describe the content of a password. More...
 
enum class  PasswordStrength {
  Blank = 0 , VeryWeak , Weak , Medium ,
  Strong , VeryStrong
}
 Strengths for a password. More...
 

Functions

constexpr CredentialCheckStatus operator~ (CredentialCheckStatus a)
 
constexpr CredentialCheckStatus operator| (CredentialCheckStatus a, CredentialCheckStatus b)
 
constexpr CredentialCheckStatus operator& (CredentialCheckStatus a, CredentialCheckStatus b)
 
constexpr CredentialCheckStatus operator^ (CredentialCheckStatus a, CredentialCheckStatus b)
 
CredentialCheckStatusoperator|= (CredentialCheckStatus &a, CredentialCheckStatus b)
 
CredentialCheckStatusoperator&= (CredentialCheckStatus &a, CredentialCheckStatus b)
 
CredentialCheckStatusoperator^= (CredentialCheckStatus &a, CredentialCheckStatus b)
 
constexpr PasswordContent operator~ (PasswordContent a)
 
constexpr PasswordContent operator| (PasswordContent a, PasswordContent b)
 
constexpr PasswordContent operator& (PasswordContent a, PasswordContent b)
 
constexpr PasswordContent operator^ (PasswordContent a, PasswordContent b)
 
PasswordContentoperator|= (PasswordContent &a, PasswordContent b)
 
PasswordContentoperator&= (PasswordContent &a, PasswordContent b)
 
PasswordContentoperator^= (PasswordContent &a, PasswordContent b)
 
PasswordStrength getPasswordStrength (const std::string &password)
 Calculates the strength of a given password.
 

Enumeration Type Documentation

◆ CredentialCheckStatus

Flags to describe the status of a validated credential.

Enumerator
Valid 

The credential is valid.

EmptyName 

The credential has an empty name.

EmptyUsernamePassword 

The credential has an empty username or password.

InvalidUri 

The credential has an invalid URI.

◆ PasswordContent

Flags to describe the content of a password.

Enumerator
Numeric 

The password contains numeric characters.

Uppercase 

The password contains uppercase characters.

Lowercase 

The password contains lowercase characters.

Special 

The password contains special characters.

◆ PasswordStrength

Strengths for a password.

Enumerator
Blank 

A blank password.

VeryWeak 

A very weak password.

Weak 

A weak password.

Medium 

A medium password.

Strong 

A strong password.

VeryStrong 

A very strong password.

Function Documentation

◆ getPasswordStrength()

PasswordStrength Nickvision::Keyring::getPasswordStrength ( const std::string & password)

Calculates the strength of a given password.

Parameters
passwordThe password to measure the strength of
Returns
The strength of the password

◆ operator&() [1/2]

CredentialCheckStatus Nickvision::Keyring::operator& ( CredentialCheckStatus a,
CredentialCheckStatus b )
constexpr

◆ operator&() [2/2]

PasswordContent Nickvision::Keyring::operator& ( PasswordContent a,
PasswordContent b )
constexpr

◆ operator&=() [1/2]

CredentialCheckStatus & Nickvision::Keyring::operator&= ( CredentialCheckStatus & a,
CredentialCheckStatus b )
inline

◆ operator&=() [2/2]

PasswordContent & Nickvision::Keyring::operator&= ( PasswordContent & a,
PasswordContent b )
inline

◆ operator^() [1/2]

CredentialCheckStatus Nickvision::Keyring::operator^ ( CredentialCheckStatus a,
CredentialCheckStatus b )
constexpr

◆ operator^() [2/2]

PasswordContent Nickvision::Keyring::operator^ ( PasswordContent a,
PasswordContent b )
constexpr

◆ operator^=() [1/2]

CredentialCheckStatus & Nickvision::Keyring::operator^= ( CredentialCheckStatus & a,
CredentialCheckStatus b )
inline

◆ operator^=() [2/2]

PasswordContent & Nickvision::Keyring::operator^= ( PasswordContent & a,
PasswordContent b )
inline

◆ operator|() [1/2]

CredentialCheckStatus Nickvision::Keyring::operator| ( CredentialCheckStatus a,
CredentialCheckStatus b )
constexpr

◆ operator|() [2/2]

PasswordContent Nickvision::Keyring::operator| ( PasswordContent a,
PasswordContent b )
constexpr

◆ operator|=() [1/2]

CredentialCheckStatus & Nickvision::Keyring::operator|= ( CredentialCheckStatus & a,
CredentialCheckStatus b )
inline

◆ operator|=() [2/2]

PasswordContent & Nickvision::Keyring::operator|= ( PasswordContent & a,
PasswordContent b )
inline

◆ operator~() [1/2]

CredentialCheckStatus Nickvision::Keyring::operator~ ( CredentialCheckStatus a)
constexpr

◆ operator~() [2/2]

PasswordContent Nickvision::Keyring::operator~ ( PasswordContent a)
constexpr