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