diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-06-01 20:28:24 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-06-01 20:39:04 +0200 |
commit | 5cffb7179fee6d70d5c8cee5b5c18ec51f1272f6 (patch) | |
tree | 9ed26ffd6cfd3d0e1dadfb83322e10b5eca04fce /src/plugins/weechat-plugin.h | |
parent | 6ac6cf729329559fa80ece1c057cb56fac81ff30 (diff) | |
download | weechat-5cffb7179fee6d70d5c8cee5b5c18ec51f1272f6.zip |
api: add function crypto_hmac (issue #1628)
Diffstat (limited to 'src/plugins/weechat-plugin.h')
-rw-r--r-- | src/plugins/weechat-plugin.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index a261d8f44..9eb42f7e9 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -68,7 +68,7 @@ struct timeval; * please change the date with current one; for a second change at same * date, increment the 01, otherwise please keep 01. */ -#define WEECHAT_PLUGIN_API_VERSION "20201004-01" +#define WEECHAT_PLUGIN_API_VERSION "20210601-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -382,6 +382,9 @@ struct t_weechat_plugin const void *salt, int salt_size, int iterations, void *hash, int *hash_size); + int (*crypto_hmac) (const void *key, int key_size, + const void *message, int message_size, + const char *hash_algo, void *hash, int *hash_size); /* directories/files */ int (*mkdir_home) (const char *directory, int mode); @@ -1347,6 +1350,14 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); __salt, __salt_size, \ __iterations, \ __hash, __hash_size) +#define weechat_crypto_hmac(__key, __key_size, \ + __message, __message_size, \ + __hash_algo, \ + __hash, __hash_size) \ + (weechat_plugin->crypto_hmac)(__key, __key_size, \ + __message, __message_size, \ + __hash_algo, \ + __hash, __hash_size) /* directories */ #define weechat_mkdir_home(__directory, __mode) \ |