mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
dir changes - things are broken at the moment
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@116 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
@ -903,10 +903,10 @@ static int check_digest(char *salt, const char *msg_passwd)
|
||||
return -1;
|
||||
|
||||
/* very simple MD5 crypt algorithm, but then the salt we use is large */
|
||||
MD5Init(&ctx);
|
||||
MD5Update(&ctx, b256_salt, salt_size); /* process the salt */
|
||||
MD5Update(&ctx, (uint8_t *)msg_passwd, strlen(msg_passwd));
|
||||
MD5Final(&ctx, md5_result);
|
||||
MD5_Init(&ctx);
|
||||
MD5_Update(&ctx, b256_salt, salt_size); /* process the salt */
|
||||
MD5_Update(&ctx, (uint8_t *)msg_passwd, strlen(msg_passwd));
|
||||
MD5_Final(md5_result, &ctx);
|
||||
return memcmp(md5_result, real_passwd, MD5_SIZE);/* 0 = ok */
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user