author | conber <conber> | 2002-06-15 09:46:14 (UTC) |
---|---|---|
committer | conber <conber> | 2002-06-15 09:46:14 (UTC) |
commit | 7f2eef29708380844922f34f59ba4e9beefbf7c3 (patch) (unidiff) | |
tree | f57125fbaabddecc35d6677f1b9e48a4594165d5 /noncore/unsupported/mail2/libmail/md5.h | |
parent | 0acbdd392814589df303b6e50c79d9822e3db27a (diff) | |
download | opie-7f2eef29708380844922f34f59ba4e9beefbf7c3.zip opie-7f2eef29708380844922f34f59ba4e9beefbf7c3.tar.gz opie-7f2eef29708380844922f34f59ba4e9beefbf7c3.tar.bz2 |
initial checkin
Diffstat (limited to 'noncore/unsupported/mail2/libmail/md5.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/mail2/libmail/md5.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/noncore/unsupported/mail2/libmail/md5.h b/noncore/unsupported/mail2/libmail/md5.h new file mode 100644 index 0000000..221dd09 --- a/dev/null +++ b/noncore/unsupported/mail2/libmail/md5.h | |||
@@ -0,0 +1,35 @@ | |||
1 | // This code was written by Colin Plumb. I've made some small changes. | ||
2 | // (Constantin Bergemann) | ||
3 | |||
4 | #ifndef _MD5_H_ | ||
5 | #define _MD5_H_ | ||
6 | |||
7 | #include <sys/types.h> | ||
8 | |||
9 | #ifdef __cplusplus | ||
10 | extern "C" { | ||
11 | #endif | ||
12 | |||
13 | #define MD5_HASHBYTES 16 | ||
14 | |||
15 | typedef struct MD5Context { | ||
16 | u_int32_t buf[4]; | ||
17 | u_int32_t bits[2]; | ||
18 | unsigned char in[64]; | ||
19 | } MD5_CTX; | ||
20 | |||
21 | extern void MD5_Init(MD5_CTX *context); | ||
22 | extern void MD5_Update(MD5_CTX *context, unsigned char const *buf, | ||
23 | unsigned len); | ||
24 | extern void MD5_Final(unsigned char digest[MD5_HASHBYTES], MD5_CTX *context); | ||
25 | extern void MD5Transform(u_int32_t buf[4], u_int32_t const in[16]); | ||
26 | extern char * MD5End(MD5_CTX *, char *); | ||
27 | extern char * MD5File(const char *, char *); | ||
28 | extern char * MD5Data (const unsigned char *, unsigned int, char *); | ||
29 | |||
30 | #ifdef __cplusplus | ||
31 | } // extern "C" | ||
32 | #endif | ||
33 | |||
34 | #endif /* !_MD5_H_ */ | ||
35 | |||