NeoMutt  2020-06-26-30-g76c339
Teaching an old dog new tricks
Go to the documentation of this file.
23 #ifndef MUTT_LIB_MD5_H
24 #define MUTT_LIB_MD5_H
26 #include <stdint.h>
27 #include <stdio.h>
29 typedef uint32_t md5_uint32;
36 struct Md5Ctx
37 {
46 };
48 void *mutt_md5(const char *str, void *buf);
49 void *mutt_md5_bytes(const void *buffer, size_t len, void *resbuf);
50 void *mutt_md5_finish_ctx(struct Md5Ctx *md5ctx, void *resbuf);
51 void mutt_md5_init_ctx(struct Md5Ctx *md5ctx);
52 void mutt_md5_process(const char *str, struct Md5Ctx *md5ctx);
53 void mutt_md5_process_bytes(const void *buf, size_t buflen, struct Md5Ctx *md5ctx);
54 void mutt_md5_toascii(const void *digest, char *resbuf);
56 #endif /* MUTT_LIB_MD5_H */
Cursor for the MD5 hashing.
Definition: md5.h:36
md5_uint32 A
Definition: md5.h:38
void * mutt_md5_finish_ctx(struct Md5Ctx *md5ctx, void *resbuf)
Process the remaining bytes in the buffer.
Definition: md5.c:286
md5_uint32 D
Definition: md5.h:41
uint32_t md5_uint32
Definition: md5.h:29
void mutt_md5_init_ctx(struct Md5Ctx *md5ctx)
Initialise the MD5 computation.
Definition: md5.c:262
md5_uint32 total[2]
Definition: md5.h:43
md5_uint32 buflen
Definition: md5.h:44
md5_uint32 C
Definition: md5.h:40
md5_uint32 buffer[32]
Definition: md5.h:45
void mutt_md5_toascii(const void *digest, char *resbuf)
Convert a binary MD5 digest into ASCII Hexadecimal.
Definition: md5.c:456
md5_uint32 B
Definition: md5.h:39
void mutt_md5_process_bytes(const void *buf, size_t buflen, struct Md5Ctx *md5ctx)
Process a block of data.
Definition: md5.c:373
void mutt_md5_process(const char *str, struct Md5Ctx *md5ctx)
Process a NULL-terminated string.
Definition: md5.c:355
void * mutt_md5_bytes(const void *buffer, size_t len, void *resbuf)
Calculate the MD5 hash of a buffer.
Definition: md5.c:336
void * mutt_md5(const char *str, void *buf)
Calculate the MD5 hash of a NULL-terminated string.
Definition: md5.c:317