diff options
Diffstat (limited to 'src/common/md5calc.c')
-rw-r--r-- | src/common/md5calc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/md5calc.c b/src/common/md5calc.c index d2fc32371..3f9ccdc41 100644 --- a/src/common/md5calc.c +++ b/src/common/md5calc.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2018 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -34,7 +34,7 @@ * Implementation of the md5 interface. */ -struct md5_interface md5_s; +static struct md5_interface md5_s; struct md5_interface *md5; /// Global variable @@ -202,7 +202,7 @@ static void md5_buf2binary(const uint8 *buf, const int buf_size, uint8 *output) //1-3 copy_len = buf_size % 64; //The number of bytes which remained is computed. - strncpy((char *)padding_message, (const char *)pbuf, copy_len); // A message is copied to an extended bit sequence. + memcpy((char *)padding_message, (const char *)pbuf, copy_len); // A message is copied to an extended bit sequence. memset(padding_message+copy_len, 0, 64 - copy_len); //It buries by 0 until it becomes extended bit length. padding_message[copy_len] |= 0x80; //The next of a message is 1. @@ -233,7 +233,7 @@ static void md5_buf2binary(const uint8 *buf, const int buf_size, uint8 *output) } /// @copydoc md5_interface::string() -void md5_string(const char *string, char *output) +static void md5_string(const char *string, char *output) { uint8 digest[16]; @@ -249,7 +249,7 @@ void md5_string(const char *string, char *output) } /// @copydoc md5_interface::salt(); -void md5_salt(int len, char *output) +static void md5_salt(int len, char *output) { int i; Assert_retv(len > 0); |