diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2019-08-29 18:42:26 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-09-01 22:44:45 -0400 |
commit | 9acba78004d4d4a149b9e1480d1d8c44b7a27cec (patch) | |
tree | 3bea723ccd1cccf43f9fcce550addb3c2c36da14 /libraries/base/include/md5.h | |
parent | cfab4abeaffa8b6a78a19bbfa485169a9c772741 (diff) | |
download | haskell-9acba78004d4d4a149b9e1480d1d8c44b7a27cec.tar.gz |
Use C99 Fixed width types to avoid hack in base's configure
Define MD5Context in terms of `uint*_t` and don't use `HsFFI.h`.
Diffstat (limited to 'libraries/base/include/md5.h')
-rw-r--r-- | libraries/base/include/md5.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/libraries/base/include/md5.h b/libraries/base/include/md5.h index a1b6157075..8d3441617a 100644 --- a/libraries/base/include/md5.h +++ b/libraries/base/include/md5.h @@ -1,18 +1,15 @@ /* MD5 message digest */ #pragma once -#include "HsFFI.h" - -typedef HsWord32 word32; -typedef HsWord8 byte; +#include <stdint.h> struct MD5Context { - word32 buf[4]; - word32 bytes[2]; - word32 in[16]; + uint32_t buf[4]; + uint32_t bytes[2]; + uint32_t in[16]; }; void __hsbase_MD5Init(struct MD5Context *context); -void __hsbase_MD5Update(struct MD5Context *context, byte const *buf, int len); -void __hsbase_MD5Final(byte digest[16], struct MD5Context *context); -void __hsbase_MD5Transform(word32 buf[4], word32 const in[16]); +void __hsbase_MD5Update(struct MD5Context *context, uint8_t const *buf, int len); +void __hsbase_MD5Final(uint8_t digest[16], struct MD5Context *context); +void __hsbase_MD5Transform(uint32_t buf[4], uint32_t const in[16]); |