QtPass
2.0.0
Developer documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
passwordconfiguration.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2018 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
8
#ifndef SRC_PASSWORDCONFIGURATION_H_
9
#define SRC_PASSWORDCONFIGURATION_H_
10
11
#include <QString>
12
22
struct
PasswordConfiguration
{
27
enum
CharacterSet
{
28
ALLCHARS
= 0,
29
ALPHABETICAL
,
30
ALPHANUMERIC
,
31
CUSTOM
,
32
CHARSETS_COUNT
34
};
35
38
CharacterSet
selected
{
ALLCHARS
};
42
int
length
{16};
47
QString
Characters
[
CHARSETS_COUNT
];
51
PasswordConfiguration
() {
52
Characters
[
ALLCHARS
] =
53
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890~!@#$%^&"
54
"*()_-+={}[]|:;<>,.?"
;
/*AllChars*/
55
Characters
[
ALPHABETICAL
] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu"
56
"vwxyz"
;
/*Only Alphabetical*/
57
Characters
[
ALPHANUMERIC
] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu"
58
"vwxyz1234567890"
;
/*Alphabetical and Numerical*/
59
Characters
[
CUSTOM
] =
Characters
[
ALLCHARS
];
// may be redefined by user
60
}
61
};
62
63
#endif
// SRC_PASSWORDCONFIGURATION_H_
PasswordConfiguration::length
int length
Length of the generated password, in characters.
Definition
passwordconfiguration.h:42
PasswordConfiguration::selected
CharacterSet selected
Currently active character set selection.
Definition
passwordconfiguration.h:38
PasswordConfiguration::Characters
QString Characters[CHARSETS_COUNT]
The alphabet of each character set, indexed by CharacterSet. Only the CUSTOM entry is meant to be cha...
Definition
passwordconfiguration.h:47
PasswordConfiguration::CharacterSet
CharacterSet
Character set options for password generation; also the index into Characters.
Definition
passwordconfiguration.h:27
PasswordConfiguration::ALPHABETICAL
@ ALPHABETICAL
Definition
passwordconfiguration.h:29
PasswordConfiguration::CHARSETS_COUNT
@ CHARSETS_COUNT
Definition
passwordconfiguration.h:32
PasswordConfiguration::ALLCHARS
@ ALLCHARS
Definition
passwordconfiguration.h:28
PasswordConfiguration::CUSTOM
@ CUSTOM
Definition
passwordconfiguration.h:31
PasswordConfiguration::ALPHANUMERIC
@ ALPHANUMERIC
Definition
passwordconfiguration.h:30
PasswordConfiguration::PasswordConfiguration
PasswordConfiguration()
Construct a PasswordConfiguration with sensible defaults.
Definition
passwordconfiguration.h:51
src
passwordconfiguration.h
Generated by
1.18.0