diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-20 06:53:53 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-20 07:10:47 -0600 |
commit | 22c11a419cab407c23a2ea16d7d2a63fe8b39756 (patch) | |
tree | b5c1e24e6ca8fd2134d86bec152c1d552c1c7404 | |
parent | c6150de3fc72d6b8b1dc8efd30b055104c9072f0 (diff) | |
download | px4-nuttx-22c11a419cab407c23a2ea16d7d2a63fe8b39756.tar.gz px4-nuttx-22c11a419cab407c23a2ea16d7d2a63fe8b39756.tar.bz2 px4-nuttx-22c11a419cab407c23a2ea16d7d2a63fe8b39756.zip |
Fixing md5 hashing when digest[$i] lower that 16. Sergey <sectus@mail.ru>
-rw-r--r-- | apps/netutils/codecs/md5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/netutils/codecs/md5.c b/apps/netutils/codecs/md5.c index e29fb637b..1810d75b6 100644 --- a/apps/netutils/codecs/md5.c +++ b/apps/netutils/codecs/md5.c @@ -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; |