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.cpp | |
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.cpp')
-rw-r--r-- | lang/cpp/src/key.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp index 55eb0585..9e57013a 100644 --- a/lang/cpp/src/key.cpp +++ b/lang/cpp/src/key.cpp @@ -373,9 +373,9 @@ const char *Subkey::fingerprint() const return subkey ? subkey->fpr : 0 ; } -unsigned int Subkey::publicKeyAlgorithm() const +Subkey::PubkeyAlgo Subkey::publicKeyAlgorithm() const { - return subkey ? subkey->pubkey_algo : 0 ; + return subkey ? static_cast<PubkeyAlgo>(subkey->pubkey_algo) : AlgoUnknown; } const char *Subkey::publicKeyAlgorithmAsString() const |