diff options
author | Werner Koch <wk@gnupg.org> | 2020-02-09 21:20:48 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-02-09 21:26:35 +0100 |
commit | 3a1fa13eedb969b561bae18cd3d7c2fb0b63d6ab (patch) | |
tree | 704e4441d3a713a82dd587e94c6874cd1615f87e /Makefile.am | |
parent | common: Add OpenPGP<->Gcrypt pubkey id mapping functions. (diff) | |
download | gnupg2-3a1fa13eedb969b561bae18cd3d7c2fb0b63d6ab.tar.xz gnupg2-3a1fa13eedb969b561bae18cd3d7c2fb0b63d6ab.zip |
common: New function get_keyalgo_string.
* common/openpgp-oid.c (struct keyalgo_string_s): New.
(keyalgo_strings): New.
(keyalgo_strings_size, keyalgo_strings_used): New.
(get_keyalgo_string): New.
--
This function is intended as a more general version of gpg's
pubkey_string function. It has the advantage to avoid mallocs and
uses static table of algorithm strings instead. There should be only
a few dozen of such strings (if at all) and thus all those allocations
we do internally in gpg's pubkey_string and the static buffers all
over the place are not too nice.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions