annotate src/md5/md5.h @ 304:d5ce2ba71e7b

manual formating of Received: hdrs; changed hdr for local receival Now the Received: headers are much friendlier to read. About folding: We must fold any line at 998 chars before transfer. We should fold the lines we produce at 78 chars. That is what RFC 2821 requests. We should think about it, somewhen. The header for locally (i.e. non-SMTP) received mail is changed to the format postfix uses. This matches RFC 2821 better. The `from' clause should contain a domain or IP, not a user name. Also, the `with' clause should contain a registered standard protocol name, which ``local'' is not.
author markus schnalke <meillo@marmaro.de>
date Thu, 09 Dec 2010 18:28:11 -0300
parents 8742d2cee364
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
209
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
1 /*
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
2 * This is an OpenSSL-compatible implementation of the RSA Data Security,
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
3 * Inc. MD5 Message-Digest Algorithm (RFC 1321).
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
4 *
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
5 * Written by Solar Designer <solar at openwall.com> in 2001, and placed
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
6 * in the public domain. There's absolutely no warranty.
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
7 *
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
8 * See md5.c for more information.
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
9 */
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
10
209
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
11 #ifdef HAVE_OPENSSL
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
12 #include <openssl/md5.h>
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
13 #elif !defined(_MD5_H)
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
14 #define _MD5_H
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
15
209
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
16 /* Any 32-bit or wider unsigned integer data type will do */
221
8742d2cee364 added a note to the long vs. int question in md5.h
meillo@marmaro.de
parents: 210
diff changeset
17 /* Note: Using an int will work on most systems and might perform much better */
210
e0938c511243 we need at least 32 bits, so let's take a long
meillo@marmaro.de
parents: 209
diff changeset
18 typedef unsigned long MD5_u32plus;
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
19
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
20 typedef struct {
209
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
21 MD5_u32plus lo, hi;
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
22 MD5_u32plus a, b, c, d;
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
23 unsigned char buffer[64];
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
24 MD5_u32plus block[16];
0
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
25 } MD5_CTX;
08114f7dcc23 this is masqmail-0.2.21 from oliver kurth
meillo@marmaro.de
parents:
diff changeset
26
209
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
27 extern void MD5_Init(MD5_CTX *ctx);
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
28 extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
29 extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
30
10da50168dab replaced the MD5 implementation with the one of Solar Designer
meillo@marmaro.de
parents: 10
diff changeset
31 #endif