aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/key.h
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2016-07-06 13:07:34 +0000
committerAndre Heinecke <[email protected]>2016-07-06 13:07:34 +0000
commite41ae4db9e70d9aebf80ebbd4ce03977435c2ccf (patch)
tree2f3c2131a0386644fcc1db8028d3b479d07fcbd3 /lang/cpp/src/key.h
parentQt: Add check for pubkeyAlgo in t-keylist (diff)
downloadgpgme-e41ae4db9e70d9aebf80ebbd4ce03977435c2ccf.tar.gz
gpgme-e41ae4db9e70d9aebf80ebbd4ce03977435c2ccf.zip
Cpp: Expose gpgme_pubkey_algo_name
* lang/cpp/src/key.cpp (Subkey::publicKeyAlgorithmAsString): New static variant. * lang/cpp/src/key.h: Declare function. Clarify comment about name mismatch.
Diffstat (limited to '')
-rw-r--r--lang/cpp/src/key.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h
index 845b5dbd..bb0487b9 100644
--- a/lang/cpp/src/key.h
+++ b/lang/cpp/src/key.h
@@ -233,11 +233,16 @@ public:
*/
const char *publicKeyAlgorithmAsString() const;
+ /** @brief Same as publicKeyAlgorithmAsString but static. */
+ static const char *publicKeyAlgorithmAsString(PubkeyAlgo algo);
+
/**
@brief Get the key algo string like GnuPG 2.1 prints it.
This returns combinations of size and algorithm. Like
- bp512 or rsa2048
+ bp512 or rsa2048. Misnamed because publicKeyAlgorithmAsString
+ already used the older pubkey_algo_name.
+ Actually uses gpgme_pubkey_algo_string.
@returns the key algorithm as string. Empty string on error.
*/