summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/md5/md5.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/md5/md5.h')
-rw-r--r--src/lib/libcrypto/md5/md5.h51
1 files changed, 33 insertions, 18 deletions
diff --git a/src/lib/libcrypto/md5/md5.h b/src/lib/libcrypto/md5/md5.h
index 357c6c625d..bdab6d45e8 100644
--- a/src/lib/libcrypto/md5/md5.h
+++ b/src/lib/libcrypto/md5/md5.h
@@ -63,35 +63,50 @@
63extern "C" { 63extern "C" {
64#endif 64#endif
65 65
66#ifdef NO_MD5
67#error MD5 is disabled.
68#endif
69
70/*
71 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
72 * ! MD5_LONG has to be at least 32 bits wide. If it's wider, then !
73 * ! MD5_LONG_LOG2 has to be defined along. !
74 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
75 */
76
77#if defined(WIN16) || defined(__LP32__)
78#define MD5_LONG unsigned long
79#elif defined(_CRAY) || defined(__ILP64__)
80#define MD5_LONG unsigned long
81#define MD5_LONG_LOG2 3
82/*
83 * _CRAY note. I could declare short, but I have no idea what impact
84 * does it have on performance on none-T3E machines. I could declare
85 * int, but at least on C90 sizeof(int) can be chosen at compile time.
86 * So I've chosen long...
87 * <appro@fy.chalmers.se>
88 */
89#else
90#define MD5_LONG unsigned int
91#endif
92
66#define MD5_CBLOCK 64 93#define MD5_CBLOCK 64
67#define MD5_LBLOCK 16 94#define MD5_LBLOCK (MD5_CBLOCK/4)
68#define MD5_BLOCK 16
69#define MD5_LAST_BLOCK 56
70#define MD5_LENGTH_BLOCK 8
71#define MD5_DIGEST_LENGTH 16 95#define MD5_DIGEST_LENGTH 16
72 96
73typedef struct MD5state_st 97typedef struct MD5state_st
74 { 98 {
75 unsigned long A,B,C,D; 99 MD5_LONG A,B,C,D;
76 unsigned long Nl,Nh; 100 MD5_LONG Nl,Nh;
77 unsigned long data[MD5_LBLOCK]; 101 MD5_LONG data[MD5_LBLOCK];
78 int num; 102 int num;
79 } MD5_CTX; 103 } MD5_CTX;
80 104
81#ifndef NOPROTO
82void MD5_Init(MD5_CTX *c); 105void MD5_Init(MD5_CTX *c);
83void MD5_Update(MD5_CTX *c, unsigned char *data, unsigned long len); 106void MD5_Update(MD5_CTX *c, const unsigned char *data, unsigned long len);
84void MD5_Final(unsigned char *md, MD5_CTX *c); 107void MD5_Final(unsigned char *md, MD5_CTX *c);
85unsigned char *MD5(unsigned char *d, unsigned long n, unsigned char *md); 108unsigned char *MD5(unsigned char *d, unsigned long n, unsigned char *md);
86void MD5_Transform(MD5_CTX *c, unsigned char *b); 109void MD5_Transform(MD5_CTX *c, const unsigned char *b);
87#else
88void MD5_Init();
89void MD5_Update();
90void MD5_Final();
91unsigned char *MD5();
92void MD5_Transform();
93#endif
94
95#ifdef __cplusplus 110#ifdef __cplusplus
96} 111}
97#endif 112#endif