1 /* Licensed under GPLv2+ - see LICENSE file for details */
8 * md4_ctx - context structure for md4 hashing
9 * @hash: the 128-bit hash value (only valid after md4_finish)
10 * @block: internal working state.
11 * @byte_count: the total number of bytes processed.
15 unsigned char bytes[16];
23 * md4_init - (re-)initialize the struct md4_ctx before md4_hash.
24 * @mctx: the struct md4_ctx which will be handed to md4_hash.
26 * Contexts can be safely re-used by calling md4_init() on them again.
34 void md4_init(struct md4_ctx *mctx);
37 * md4_hash - add these bytes into the hash
38 * @mctx: the struct md4_ctx.
39 * @p: pointer to the bytes to hash.
40 * @len: the number of bytes pointed to by @p.
46 * md4_hash(&ctx, "hello", 5);
47 * md4_hash(&ctx, " ", 1);
48 * md4_hash(&ctx, "world", 5);
50 void md4_hash(struct md4_ctx *mctx, const void *p, size_t len);
53 * md4_finish - complete the MD4 hash
54 * @mctx: the struct md4_ctx.
60 * md4_hash(&ctx, "hello world", strlen("hello world"));
63 void md4_finish(struct md4_ctx *mctx);
65 #endif /* CCAN_MD4_H */