File indexing completed on 2024-06-23 05:14:12

0001 /*  smartcard/utils.h
0002 
0003     This file is part of Kleopatra, the KDE keymanager
0004     SPDX-FileCopyrightText: 2020 g10 Code GmbH
0005     SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 #pragma once
0010 
0011 #include <memory>
0012 #include <string>
0013 #include <vector>
0014 
0015 class QString;
0016 
0017 namespace Kleo
0018 {
0019 namespace SmartCard
0020 {
0021 struct AlgorithmInfo;
0022 class OpenPGPCard;
0023 
0024 QString displayAppName(const std::string &appName);
0025 
0026 /**
0027  * Returns the subset of algorithms \p supportedAlgorithms that are compliant.
0028  */
0029 std::vector<AlgorithmInfo> getAllowedAlgorithms(const std::vector<AlgorithmInfo> &supportedAlgorithms);
0030 
0031 /**
0032  * Returns the ID of the algorithm in the list \p candidates that is preferred
0033  * over the other candidates.
0034  */
0035 std::string getPreferredAlgorithm(const std::vector<AlgorithmInfo> &candidates);
0036 
0037 } // namespace Smartcard
0038 } // namespace Kleopatra