QtPass
2.0.0
Developer documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
userinfo.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2015 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
8
#ifndef SRC_USERINFO_H_
9
#define SRC_USERINFO_H_
10
11
#include <QDateTime>
12
#include <QString>
13
#include <QStringList>
14
20
struct
UserInfo
{
24
UserInfo
() =
default
;
25
31
auto
fullyValid
() const ->
bool
{
32
return
(
validity
==
'f'
) || (
validity
==
'u'
);
33
}
34
39
auto
marginallyValid
() const ->
bool
{
return
validity
==
'm'
; }
44
auto
isValid
() const ->
bool
{
return
fullyValid
() ||
marginallyValid
(); }
45
49
QString
name
;
53
QString
key_id
;
58
QStringList
uids
;
63
QStringList
subkeys
;
68
char
validity
{
'-'
};
72
bool
have_secret
{
false
};
76
bool
enabled
{
false
};
80
QDateTime
expiry
;
84
QDateTime
created
;
85
};
86
87
#endif
// SRC_USERINFO_H_
UserInfo::have_secret
bool have_secret
Whether secret key is available (can decrypt with this key).
Definition
userinfo.h:72
UserInfo::enabled
bool enabled
Whether this user/key is enabled for normal use.
Definition
userinfo.h:76
UserInfo::marginallyValid
auto marginallyValid() const -> bool
Check marginal validity per GnuPG validity codes.
Definition
userinfo.h:39
UserInfo::uids
QStringList uids
Every user ID on the key, revoked ones included, with gpg's colon escapes (such as \x3a) decoded: the...
Definition
userinfo.h:58
UserInfo::UserInfo
UserInfo()=default
Construct a UserInfo with default (invalid/disabled) state.
UserInfo::subkeys
QStringList subkeys
Key IDs and fingerprints of the key's subkeys, by which a recipient list may name the key as well.
Definition
userinfo.h:63
UserInfo::key_id
QString key_id
Hexadecimal representation of the GnuPG key identifier.
Definition
userinfo.h:53
UserInfo::fullyValid
auto fullyValid() const -> bool
Check full validity per GnuPG validity codes.
Definition
userinfo.h:31
UserInfo::isValid
auto isValid() const -> bool
Check whether the key has any usable validity level.
Definition
userinfo.h:44
UserInfo::created
QDateTime created
Date/time when key was created.
Definition
userinfo.h:84
UserInfo::name
QString name
GPG user ID / full name.
Definition
userinfo.h:49
UserInfo::validity
char validity
GnuPG representation of validity. http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg....
Definition
userinfo.h:68
UserInfo::expiry
QDateTime expiry
Date/time when key expires.
Definition
userinfo.h:80
src
userinfo.h
Generated by
1.18.0