11#include <config-libkleo.h>
17#include <QGpgME/CryptoConfig>
19#include <gpgme++/key.h>
21using namespace QGpgME;
23QGpgME::CryptoConfigEntry *Kleo::getCryptoConfigEntry(
const CryptoConfig *config,
const char *componentName,
const char *entryName)
31bool Kleo::keyHasCertify(
const GpgME::Key &key)
33#if GPGMEPP_KEY_HAS_HASCERTIFY_SIGN_ENCRYPT_AUTHENTICATE
34 return key.hasCertify();
36 return Kleo::any_of(key.subkeys(), [](
const auto &subkey) {
37 return subkey.canCertify();
42bool Kleo::keyHasSign(
const GpgME::Key &key)
44#if GPGMEPP_KEY_HAS_HASCERTIFY_SIGN_ENCRYPT_AUTHENTICATE
47 return Kleo::any_of(key.subkeys(), [](
const auto &subkey) {
48 return subkey.canSign();
53bool Kleo::keyHasEncrypt(
const GpgME::Key &key)
55#if GPGMEPP_KEY_HAS_HASCERTIFY_SIGN_ENCRYPT_AUTHENTICATE
56 return key.hasEncrypt();
58 return Kleo::any_of(key.subkeys(), [](
const auto &subkey) {
59 return subkey.canEncrypt();
64bool Kleo::keyHasAuthenticate(
const GpgME::Key &key)
66#if GPGMEPP_KEY_HAS_HASCERTIFY_SIGN_ENCRYPT_AUTHENTICATE
67 return key.hasAuthenticate();
69 return Kleo::any_of(key.subkeys(), [](
const auto &subkey) {
70 return subkey.canAuthenticate();
QString fromLatin1(QByteArrayView str)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:11:58 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.