summaryrefslogtreecommitdiff
path: root/src/gcrypt-int.h
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 /src/gcrypt-int.h
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 'src/gcrypt-int.h')
-rw-r--r--src/gcrypt-int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gcrypt-int.h b/src/gcrypt-int.h
index 65dcb4d0..8a6df840 100644
--- a/src/gcrypt-int.h
+++ b/src/gcrypt-int.h
@@ -180,6 +180,7 @@ gpg_err_code_t _gcry_mac_write (gcry_mac_hd_t hd, const void *buffer,
gpg_err_code_t _gcry_mac_read (gcry_mac_hd_t hd, void *buffer, size_t *buflen);
gpg_err_code_t _gcry_mac_verify (gcry_mac_hd_t hd, const void *buffer,
size_t buflen);
+int _gcry_mac_get_algo (gcry_mac_hd_t hd);
unsigned int _gcry_mac_get_algo_maclen (int algo);
unsigned int _gcry_mac_get_algo_keylen (int algo);
const char *_gcry_mac_algo_name (int algorithm) _GCRY_GCC_ATTR_PURE;