annotate src/lib/md5.h @ 22664:fea53c2725c0

director: Fix director_max_parallel_moves/kicks type Should be uint, not time.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 09 Nov 2017 12:24:16 +0200
parents 7e016f5e8cb4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 /*
21
163675942b83 Replaced the MD5 implementation with Solar Designer's.
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
2 * This is an OpenSSL-compatible implementation of the RSA Data Security,
163675942b83 Replaced the MD5 implementation with Solar Designer's.
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
3 * Inc. MD5 Message-Digest Algorithm.
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 *
21
163675942b83 Replaced the MD5 implementation with Solar Designer's.
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
5 * Written by Solar Designer <solar@openwall.com> in 2001, and placed in
163675942b83 Replaced the MD5 implementation with Solar Designer's.
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
6 * the public domain. See md5.c for more information.
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7 */
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
8
6410
e4eb71ae8e96 Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents: 4642
diff changeset
9 #ifndef MD5_H
e4eb71ae8e96 Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents: 4642
diff changeset
10 #define MD5_H
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
11
12307
368fd1cce4d6 liblib: Added a common API for accessing all hash methods.
Timo Sirainen <tss@iki.fi>
parents: 6410
diff changeset
12 #include "hash-method.h"
368fd1cce4d6 liblib: Added a common API for accessing all hash methods.
Timo Sirainen <tss@iki.fi>
parents: 6410
diff changeset
13
4642
0448f2fa8349 Added MD5_RESULTLEN macro.
Timo Sirainen <tss@iki.fi>
parents: 903
diff changeset
14 #define MD5_RESULTLEN (128/8)
0448f2fa8349 Added MD5_RESULTLEN macro.
Timo Sirainen <tss@iki.fi>
parents: 903
diff changeset
15
903
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
16 struct md5_context {
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
17 uint_fast32_t lo, hi;
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
18 uint_fast32_t a, b, c, d;
21
163675942b83 Replaced the MD5 implementation with Solar Designer's.
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
19 unsigned char buffer[64];
4642
0448f2fa8349 Added MD5_RESULTLEN macro.
Timo Sirainen <tss@iki.fi>
parents: 903
diff changeset
20 uint_fast32_t block[MD5_RESULTLEN];
903
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
21 };
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
22
903
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
23 void md5_init(struct md5_context *ctx);
fd8888f6f037 Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents: 183
diff changeset
24 void md5_update(struct md5_context *ctx, const void *data, size_t size);
20328
7e016f5e8cb4 [LEN] to [static LEN] on some function parameters
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
parents: 12307
diff changeset
25 void md5_final(struct md5_context *ctx,
7e016f5e8cb4 [LEN] to [static LEN] on some function parameters
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
parents: 12307
diff changeset
26 unsigned char result[STATIC_ARRAY MD5_RESULTLEN]);
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
27
4642
0448f2fa8349 Added MD5_RESULTLEN macro.
Timo Sirainen <tss@iki.fi>
parents: 903
diff changeset
28 void md5_get_digest(const void *data, size_t size,
20328
7e016f5e8cb4 [LEN] to [static LEN] on some function parameters
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
parents: 12307
diff changeset
29 unsigned char result[STATIC_ARRAY MD5_RESULTLEN]);
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
30
12307
368fd1cce4d6 liblib: Added a common API for accessing all hash methods.
Timo Sirainen <tss@iki.fi>
parents: 6410
diff changeset
31 extern const struct hash_method hash_method_md5;
368fd1cce4d6 liblib: Added a common API for accessing all hash methods.
Timo Sirainen <tss@iki.fi>
parents: 6410
diff changeset
32
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
33 #endif