summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2013-12-27 12:37:11 +0400
committerWerner Koch <wk@gnupg.org>2014-01-13 10:40:30 +0100
commit8439a379c86ef1088465ea70ac10840759a1638e (patch)
treedda6a6addc52283111b88105e693203d405ff059 /doc
parent36c9e0e4eb4f935da90df1c8df484d1940bda5eb (diff)
downloadlibgcrypt-8439a379c86ef1088465ea70ac10840759a1638e.tar.gz
Add a function to retrieve algorithm used by MAC handler
* cipher/mac.c (_gcry_mac_get_algo): New function, returns used algo. * src/visibility.c (gcry_mac_get_algo): New wrapper. * src/visibility.h: Hanlde gcry_mac_get_algo. * src/gcrypt-int.h (_gcry_mac_get_algo): New. * src/gcrypt.h.in (gcry_mac_get_algo): New. * src/libgcrypt.def (gcry_mac_get_algo): New. * src/libgcrypt.vers (gcry_mac_get_algo): New. * doc/gcrypt.texi: Document gcry_mac_get_algo. * tests/basic.c (check_one_mac): Verify gcry_mac_get_algo. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/gcrypt.texi10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index ce17c8eb..25d8227c 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -3722,6 +3722,16 @@ the MAC calculated in object @var{h}.
@end deftypefun
+In some situations it might be hard to remember the algorithm used for
+the MAC calculation. The following function might be used to get that
+information:
+
+@deftypefun {int} gcry_mac_get_algo (gcry_mac_hd_t @var{h})
+
+Retrieve the algorithm used with the handle @var{h}.
+@end deftypefun
+
+
@c ***********************************
@c ***** MAC info functions **********
@c ***********************************