mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-17 07:12:06 +08:00
Fixing md5 hashing when digest[$i] lower that 16. Sergey <sectus@mail.ru>
This commit is contained in:
@@ -395,7 +395,7 @@ char *md5_hash(const uint8_t * addr, const size_t len)
|
||||
md5_sum(addr, len, digest);
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
sprintf(&hash[i * 2], "%.2x", digest[i]);
|
||||
sprintf(&hash[i * 2], "%02x", digest[i]);
|
||||
}
|
||||
|
||||
hash[32] = 0;
|
||||
|
Reference in New Issue
Block a user