mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
A fix for Bug#13944 "libmysqlclient exporting sha1_result function":
rename sha1_* to mysql_sha1_* include/sha1.h: rename sha1_* to mysql_sha1_* mysys/sha1.c: rename sha1_* to mysql_sha1_* sql/item_strfunc.cc: rename sha1_* to mysql_sha1_* sql/password.c: rename sha1_* to mysql_sha1_*
This commit is contained in:
parent
29818203eb
commit
31ff9e9a10
4 changed files with 39 additions and 37 deletions
|
|
@ -131,11 +131,13 @@ String *Item_func_sha::val_str(String *str)
|
|||
SHA1_CONTEXT context; /* Context used to generate SHA1 hash */
|
||||
/* Temporary buffer to store 160bit digest */
|
||||
uint8 digest[SHA1_HASH_SIZE];
|
||||
sha1_reset(&context); /* We do not have to check for error here */
|
||||
mysql_sha1_reset(&context); /* We do not have to check for error here */
|
||||
/* No need to check error as the only case would be too long message */
|
||||
sha1_input(&context,(const unsigned char *) sptr->ptr(), sptr->length());
|
||||
mysql_sha1_input(&context,
|
||||
(const unsigned char *) sptr->ptr(), sptr->length());
|
||||
/* Ensure that memory is free and we got result */
|
||||
if (!( str->alloc(SHA1_HASH_SIZE*2) || (sha1_result(&context,digest))))
|
||||
if (!( str->alloc(SHA1_HASH_SIZE*2) ||
|
||||
(mysql_sha1_result(&context,digest))))
|
||||
{
|
||||
sprintf((char *) str->ptr(),
|
||||
"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue