NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
md5.h
Go to the documentation of this file.
1
22
23
#ifndef MUTT_MUTT_MD5_H
24
#define MUTT_MUTT_MD5_H
25
26
#include <stdint.h>
27
#include <stdio.h>
28
29
typedef
uint32_t
md5_uint32
;
30
36
struct
Md5Ctx
37
{
38
md5_uint32
A
;
39
md5_uint32
B
;
40
md5_uint32
C
;
41
md5_uint32
D
;
42
43
md5_uint32
total
[2];
44
md5_uint32
buflen
;
45
md5_uint32
buffer
[32];
46
};
47
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);
55
56
#endif
/* MUTT_MUTT_MD5_H */
mutt_md5
void * mutt_md5(const char *str, void *buf)
Calculate the MD5 hash of a NUL-terminated string.
Definition
md5.c:317
mutt_md5_process_bytes
void mutt_md5_process_bytes(const void *buf, size_t buflen, struct Md5Ctx *md5ctx)
Process a block of data.
Definition
md5.c:373
mutt_md5_bytes
void * mutt_md5_bytes(const void *buffer, size_t len, void *resbuf)
Calculate the MD5 hash of a buffer.
Definition
md5.c:336
mutt_md5_process
void mutt_md5_process(const char *str, struct Md5Ctx *md5ctx)
Process a NUL-terminated string.
Definition
md5.c:355
md5_uint32
uint32_t md5_uint32
Definition
md5.h:29
mutt_md5_init_ctx
void mutt_md5_init_ctx(struct Md5Ctx *md5ctx)
Initialise the MD5 computation.
Definition
md5.c:261
mutt_md5_finish_ctx
void * mutt_md5_finish_ctx(struct Md5Ctx *md5ctx, void *resbuf)
Process the remaining bytes in the buffer.
Definition
md5.c:285
mutt_md5_toascii
void mutt_md5_toascii(const void *digest, char *resbuf)
Convert a binary MD5 digest into ASCII Hexadecimal.
Definition
md5.c:456
Md5Ctx
Cursor for the MD5 hashing.
Definition
md5.h:37
Md5Ctx::total
md5_uint32 total[2]
Total bytes processed.
Definition
md5.h:43
Md5Ctx::D
md5_uint32 D
Accumulator D.
Definition
md5.h:41
Md5Ctx::C
md5_uint32 C
Accumulator C.
Definition
md5.h:40
Md5Ctx::buflen
md5_uint32 buflen
Buffer length.
Definition
md5.h:44
Md5Ctx::A
md5_uint32 A
Accumulator A.
Definition
md5.h:38
Md5Ctx::B
md5_uint32 B
Accumulator B.
Definition
md5.h:39
Md5Ctx::buffer
md5_uint32 buffer[32]
Internal buffer.
Definition
md5.h:45