diff options
author | Sami Kerola | 2011-07-20 22:13:32 +0200 |
---|---|---|
committer | Sami Kerola | 2011-07-21 23:56:48 +0200 |
commit | e429d141061d47c567b6790f3c7d9e51e8a356a7 (patch) | |
tree | 673b8cb4880f208a2152e327249fa3622ef01eae /include/md5.h | |
parent | mkfs.cramfs: use program_invocation_short_name (diff) | |
download | kernel-qcow2-util-linux-e429d141061d47c567b6790f3c7d9e51e8a356a7.tar.gz kernel-qcow2-util-linux-e429d141061d47c567b6790f3c7d9e51e8a356a7.tar.xz kernel-qcow2-util-linux-e429d141061d47c567b6790f3c7d9e51e8a356a7.zip |
md5: use symbolical digest length
Magic hash lenght number 16 is turned to a definition MD5LENGTH,
and put into use everywhere where md5 checksum is in use.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'include/md5.h')
-rw-r--r-- | include/md5.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/md5.h b/include/md5.h index d598e81be..1222cf030 100644 --- a/include/md5.h +++ b/include/md5.h @@ -7,6 +7,8 @@ typedef unsigned int uint32_t; #endif +#define MD5LENGTH 16 + struct MD5Context { uint32_t buf[4]; uint32_t bits[2]; @@ -16,7 +18,7 @@ struct MD5Context { void MD5Init(struct MD5Context *context); void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len); -void MD5Final(unsigned char digest[16], struct MD5Context *context); +void MD5Final(unsigned char digest[MD5LENGTH], struct MD5Context *context); void MD5Transform(uint32_t buf[4], uint32_t const in[16]); /* |