music.c: cosmetix
[k8lowj.git] / src / liblj / md5.h
blob52b92e4d35d091c77f3619aa259a72e23da033b6
1 /* See md5.c for explanation and copyright information. */
3 #ifndef __LIVEJOURNAL_MD5_H__
4 #define __LIVEJOURNAL_MD5_H__
6 /* Unlike previous versions of this code, uint32 need not be exactly
7 32 bits, merely 32 bits or more. Choosing a data type which is 32
8 bits instead of 64 is not important; speed is considerably more
9 important. ANSI guarantees that "unsigned long" will be big enough,
10 and always using it seems to have few disadvantages. */
11 typedef unsigned long lj_uint32;
13 struct lj_md5_context {
14 lj_uint32 buf[4];
15 lj_uint32 bits[2];
16 unsigned char in[64];
19 void lj_md5_init (struct lj_md5_context *context);
20 void lj_md5_update (struct lj_md5_context *context,
21 unsigned char const *buf, unsigned len);
22 void lj_md5_final (unsigned char digest[16],
23 struct lj_md5_context *context);
24 void lj_md5_transform (lj_uint32 buf[4], const unsigned char in[64]);
26 /* simplified interface. */
27 void lj_md5_hash(const char *src, char *dest);
29 #endif /* __LIVEJOURNAL_MD5_H__ */