Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/lib/md4.h @ 6410:e4eb71ae8e96 HEAD
Changed .h ifdef/defines to use <NAME>_H format.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 16 Sep 2007 11:31:27 +0300 |
parents | c0464c4a2ee3 |
children |
rev | line source |
---|---|
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
1 /* |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
2 * This is an OpenSSL-compatible implementation of the RSA Data Security, |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
3 * Inc. MD4 Message-Digest Algorithm. |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
4 * |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
5 * Written by Solar Designer <solar@openwall.com> in 2001, and placed in |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
6 * the public domain. See md4.c for more information. |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
7 */ |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
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:
4643
diff
changeset
|
9 #ifndef MD4_H |
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
4643
diff
changeset
|
10 #define MD4_H |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
11 |
4643 | 12 #define MD4_RESULTLEN (128/8) |
13 | |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
14 struct md4_context { |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
15 uint_fast32_t lo, hi; |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
16 uint_fast32_t a, b, c, d; |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
17 unsigned char buffer[64]; |
4643 | 18 uint_fast32_t block[MD4_RESULTLEN]; |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
19 }; |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
20 |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
21 void md4_init(struct md4_context *ctx); |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
22 void md4_update(struct md4_context *ctx, const void *data, size_t size); |
4643 | 23 void md4_final(struct md4_context *ctx, unsigned char result[MD4_RESULTLEN]); |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
24 |
4643 | 25 void md4_get_digest(const void *data, size_t size, |
26 unsigned char result[MD4_RESULTLEN]); | |
2377
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
27 |
8f5be0be3199
NTLM authentication. Patch by Andrey Panin
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
28 #endif |