mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
Fixing md5 hashing when digest[$i] lower that 16. Sergey <sectus@mail.ru>
This commit is contained in:
parent
af6272a227
commit
b8e4d7c500
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue