diff options
author | Andre Heinecke <[email protected]> | 2016-07-06 11:38:20 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2016-07-06 11:38:20 +0000 |
commit | c28007d0407bcc3621b8266d6d77eb0d069aec35 (patch) | |
tree | 494476b8f9577e2648bd0e6cb9f3bfb8319c2f76 /lang/cpp/src/key.h | |
parent | Qt: Fix include order when buildin test (diff) | |
download | gpgme-c28007d0407bcc3621b8266d6d77eb0d069aec35.tar.gz gpgme-c28007d0407bcc3621b8266d6d77eb0d069aec35.zip |
Cpp: Add PubkeyAlgo enum
* lang/cpp/src/key.h (Subkey::PubkeyAlgo): New enum.
(Subkey::publicKeyAlgorithm): Change return type.
* lang/cpp/src/key.cpp (Subkey::publicKeyAlgorithm): Use enum.
Diffstat (limited to 'lang/cpp/src/key.h')
-rw-r--r-- | lang/cpp/src/key.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h index 7322f650..845b5dbd 100644 --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -205,7 +205,23 @@ public: bool isSecret() const; - unsigned int publicKeyAlgorithm() const; + /** Same as gpgme_pubkey_algo_t */ + enum PubkeyAlgo { + AlgoUnknown = 0, + AlgoRSA = 1, + AlgoRSA_E = 2, + AlgoRSA_S = 3, + AlgoELG_E = 16, + AlgoDSA = 17, + AlgoECC = 18, + AlgoELG = 20, + AlgoECDSA = 301, + AlgoECDH = 302, + AlgoEDDSA = 303, + AlgoMax = 1 << 31 + }; + + PubkeyAlgo publicKeyAlgorithm() const; /** @brief Get the public key algorithm name. |