#include <asm/types.h>
#include "md5.h"
-static void md5_transform(__u32 *hash, __u32 const *in)
+static void md5_transform(uint32_t *hash, uint32_t const *in)
{
- __u32 a, b, c, d;
+ uint32_t a, b, c, d;
a = hash[0];
b = hash[1];
hash[3] += d;
}
-void md5_update(struct md5_ctx *mctx, const __u8 *data, unsigned int len)
+void md5_update(struct md5_ctx *mctx, const uint8_t *data, unsigned int len)
{
- const __u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f);
+ const uint32_t avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f);
mctx->byte_count += len;
#ifndef MD5_H
#define MD5_H
-#include <asm/types.h>
+#include <stdint.h>
#define MD5_DIGEST_SIZE 16
#define MD5_HMAC_BLOCK_SIZE 64
(w += f(x, y, z) + in, w = (w<<s | w>>(32-s)) + x)
struct md5_ctx {
- __u32 hash[MD5_HASH_WORDS];
- __u32 block[MD5_BLOCK_WORDS];
- __u64 byte_count;
+ uint32_t hash[MD5_HASH_WORDS];
+ uint32_t block[MD5_BLOCK_WORDS];
+ uint64_t byte_count;
};
-extern void md5_update(struct md5_ctx *, const __u8 *, unsigned int);
+extern void md5_update(struct md5_ctx *, const uint8_t *, unsigned int);
#endif