summaryrefslogtreecommitdiff
path: root/src/common/md5calc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-04 17:08:44 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-04 17:08:44 +0300
commit3732bd4a6b708651f6b4bcd32d6beb2b7f49c478 (patch)
tree83155915c35c72d018108231437248cc78d5060d /src/common/md5calc.c
parent0bd30a0fac1db1b478b3173a22a81bd5249113f8 (diff)
parent9147fe9473b26ee32aafed65fd02b03f11397629 (diff)
downloadhercules-3732bd4a6b708651f6b4bcd32d6beb2b7f49c478.tar.gz
hercules-3732bd4a6b708651f6b4bcd32d6beb2b7f49c478.tar.bz2
hercules-3732bd4a6b708651f6b4bcd32d6beb2b7f49c478.tar.xz
hercules-3732bd4a6b708651f6b4bcd32d6beb2b7f49c478.zip
Merge pull request #1210 from HerculesWS/wcast_qual
Added -Wcast-qual compiler flag
Diffstat (limited to 'src/common/md5calc.c')
-rw-r--r--src/common/md5calc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/md5calc.c b/src/common/md5calc.c
index bc70d9006..d346c8aa4 100644
--- a/src/common/md5calc.c
+++ b/src/common/md5calc.c
@@ -169,7 +169,7 @@ static void MD5_String2binary(const char * string, unsigned char * output)
//var
/*8bit*/
unsigned char padding_message[64]; //Extended message 512bit 64byte
- const unsigned char *pstring; //The position of string in the present scanning notes is held.
+ const unsigned char *pstring; // The position of string in the present scanning notes is held.
/*32bit*/
unsigned int string_byte_len, //The byte chief of string is held.
@@ -192,7 +192,7 @@ static void MD5_String2binary(const char * string, unsigned char * output)
//Step 1.Append Padding Bits (extension of a mark bit)
//1-1
string_byte_len = (unsigned int)strlen(string); //The byte chief of a character sequence is acquired.
- pstring = (const unsigned char *)string; //The position of the present character sequence is set.
+ pstring = (const unsigned char *)string; // The position of the present character sequence is set.
//1-2 Repeat calculation until length becomes less than 64 bytes.
for (i=string_byte_len; 64<=i; i-=64,pstring+=64)
@@ -200,7 +200,7 @@ static void MD5_String2binary(const char * string, unsigned char * output)
//1-3
copy_len = string_byte_len % 64; //The number of bytes which remained is computed.
- strncpy((char *)padding_message, (const char *)pstring, copy_len); //A message is copied to an extended bit sequence.
+ strncpy((char *)padding_message, (const char *)pstring, 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.