diff options
author | Andre Heinecke <[email protected]> | 2016-04-12 14:08:10 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2016-04-12 14:08:10 +0000 |
commit | 5489532ad6ccf3a9b59405686b8a17352f1ecf06 (patch) | |
tree | 4fab4a06ea8ad868c6c1d7a77a90f179b3420ea7 /lang/cpp/src/key.h | |
parent | Cpp: Add support for gpgme_data_identify (diff) | |
download | gpgme-5489532ad6ccf3a9b59405686b8a17352f1ecf06.tar.gz gpgme-5489532ad6ccf3a9b59405686b8a17352f1ecf06.zip |
Cpp: Add support for pubkey_algo_name
* lang/cpp/src/key.cpp (Subkey::algoName): New.
* lang/cpp/src/key.h: Declare.
Diffstat (limited to 'lang/cpp/src/key.h')
-rw-r--r-- | lang/cpp/src/key.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h index 30badeaa..7322f650 100644 --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -206,8 +206,27 @@ public: bool isSecret() const; unsigned int publicKeyAlgorithm() const; + + /** + @brief Get the public key algorithm name. + + This only works for the pre 2.1 algorithms for ECC NULL is returned. + + @returns a statically allocated string with the name of the public + key algorithm, or NULL if that name is not known. + */ const char *publicKeyAlgorithmAsString() const; + /** + @brief Get the key algo string like GnuPG 2.1 prints it. + + This returns combinations of size and algorithm. Like + bp512 or rsa2048 + + @returns the key algorithm as string. Empty string on error. + */ + std::string algoName() const; + unsigned int length() const; const char *cardSerialNumber() const; |