diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-03-06 12:45:36 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-03-10 18:21:26 +0100 |
commit | bd1139ad2722cf8717cd1aaac4431f369d39562f (patch) | |
tree | c3bccfcd3ea36a5b66ab6a208c268354c929ffbf /plugin/feedback | |
parent | 6cddd12ad6eeea82b1087574e5dd5cb9accd7641 (diff) | |
download | mariadb-git-bd1139ad2722cf8717cd1aaac4431f369d39562f.tar.gz |
cleanup: generalize my_sha1.cc
move most of the code into my_sha.ic, making it independent
from the actual SHAx variant.
Diffstat (limited to 'plugin/feedback')
-rw-r--r-- | plugin/feedback/utils.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugin/feedback/utils.cc b/plugin/feedback/utils.cc index dad3d59e76d..669ed9a4427 100644 --- a/plugin/feedback/utils.cc +++ b/plugin/feedback/utils.cc @@ -20,7 +20,6 @@ #endif #include <base64.h> -#include <sha1.h> #if defined (_WIN32) #define HAVE_SYS_UTSNAME_H @@ -420,7 +419,7 @@ int fill_collation_statistics(THD *thd, TABLE_LIST *tables) int calculate_server_uid(char *dest) { uchar rawbuf[2 + 6]; - uchar shabuf[SHA1_HASH_SIZE]; + uchar shabuf[MY_SHA1_HASH_SIZE]; int2store(rawbuf, mysqld_port); if (my_gethwaddr(rawbuf + 2)) @@ -429,7 +428,7 @@ int calculate_server_uid(char *dest) return 1; } - compute_sha1_hash((uint8*) shabuf, (char*) rawbuf, sizeof(rawbuf)); + my_sha1((uint8*) shabuf, (char*) rawbuf, sizeof(rawbuf)); assert(base64_needed_encoded_length(sizeof(shabuf)) <= SERVER_UID_SIZE); base64_encode(shabuf, sizeof(shabuf), dest); |