annotate src/xs_md5.h @ 14:f5d82424b0ed

Made song-length database support FINALLY work!
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 04 Jun 2003 18:00:03 +0000
parents 4bb09e405eab
children 575686094eb1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #ifndef XS_MD5_H
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 #define XS_MD5_H
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #ifdef __cplusplus
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 extern "C" {
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 #endif
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7
14
f5d82424b0ed Made song-length database support FINALLY work!
Matti Hamalainen <ccr@tnsp.org>
parents: 4
diff changeset
8 #include <glib.h>
4
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 /*
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 * Typedefs
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 */
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 typedef struct md5_state_s {
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 guint32 count[2]; /* message length in bits, lsw first */
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 guint32 abcd[4]; /* digest buffer */
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 guint8 buf[64]; /* accumulate block */
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 } t_xs_md5state;
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18
14
f5d82424b0ed Made song-length database support FINALLY work!
Matti Hamalainen <ccr@tnsp.org>
parents: 4
diff changeset
19 #define XS_MD5HASH_LENGTH (16)
f5d82424b0ed Made song-length database support FINALLY work!
Matti Hamalainen <ccr@tnsp.org>
parents: 4
diff changeset
20 #define XS_MD5HASH_LENGTH_CH (XS_MD5HASH_LENGTH * 2)
f5d82424b0ed Made song-length database support FINALLY work!
Matti Hamalainen <ccr@tnsp.org>
parents: 4
diff changeset
21
f5d82424b0ed Made song-length database support FINALLY work!
Matti Hamalainen <ccr@tnsp.org>
parents: 4
diff changeset
22 typedef guint8 t_xs_md5hash[XS_MD5HASH_LENGTH];
f5d82424b0ed Made song-length database support FINALLY work!
Matti Hamalainen <ccr@tnsp.org>
parents: 4
diff changeset
23
4
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 /*
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 * Functions
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 */
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 void xs_md5_init(t_xs_md5state *pms);
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 void xs_md5_append(t_xs_md5state *pms, const guint8 *data, int nbytes);
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 void xs_md5_finish(t_xs_md5state *pms, t_xs_md5hash digest);
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 #ifdef __cplusplus
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 }
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 #endif
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 #endif /* XS_MD5_H */