QtPass 1.7.0
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
userinfo.h
1// SPDX-FileCopyrightText: 2015 Anne Jan Brouwer
2// SPDX-License-Identifier: GPL-3.0-or-later
3#ifndef SRC_USERINFO_H_
4#define SRC_USERINFO_H_
5
6#include <QDateTime>
7#include <QString>
8
13struct UserInfo {
17 UserInfo() : validity('-'), have_secret(false), enabled(false) {}
18
24 auto fullyValid() const -> bool {
25 return (validity == 'f') || (validity == 'u');
26 }
27
32 auto marginallyValid() const -> bool { return validity == 'm'; }
37 auto isValid() const -> bool { return fullyValid() || marginallyValid(); }
38
42 QString name;
46 QString key_id;
59 bool enabled;
63 QDateTime expiry;
67 QDateTime created;
68};
69
70#endif // SRC_USERINFO_H_
bool have_secret
Whether secret key is available (can decrypt with this key).
Definition userinfo.h:55
bool enabled
Whether this user/key is enabled for normal use.
Definition userinfo.h:59
auto marginallyValid() const -> bool
Check marginal validity per GnuPG validity codes.
Definition userinfo.h:32
QString key_id
Hexadecimal representation of the GnuPG key identifier.
Definition userinfo.h:46
auto fullyValid() const -> bool
Check full validity per GnuPG validity codes.
Definition userinfo.h:24
auto isValid() const -> bool
Check whether the key has any usable validity level.
Definition userinfo.h:37
QDateTime created
Date/time when key was created.
Definition userinfo.h:67
QString name
GPG user ID / full name.
Definition userinfo.h:42
UserInfo()
Construct a UserInfo with default (invalid/disabled) state.
Definition userinfo.h:17
char validity
GnuPG representation of validity. http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg....
Definition userinfo.h:51
QDateTime expiry
Date/time when key expires.
Definition userinfo.h:63