Mercurial > hg > xmms-sid
annotate src/xs_md5.h @ 683:3cc9b8e23d88
SLDB is now distributed with HVSC.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 19 May 2008 07:35:12 +0300 |
parents | b0743dc9165d |
children | 4bf845090a25 |
rev | line source |
---|---|
4 | 1 #ifndef XS_MD5_H |
2 #define XS_MD5_H | |
3 | |
214 | 4 #include <glib.h> |
5 | |
4 | 6 #ifdef __cplusplus |
7 extern "C" { | |
8 #endif | |
9 | |
491
a3fdd2d6c056
Changed the MD5 implementation, the previous had a license that was somewhat
Matti Hamalainen <ccr@tnsp.org>
parents:
379
diff
changeset
|
10 /* Typedefs |
4 | 11 */ |
12 typedef struct md5_state_s { | |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
13 guint32 bits[2]; /* message length in bits, lsw first */ |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
14 guint32 buf[4]; /* digest buffer */ |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
15 guint8 in[64]; /* accumulate block */ |
657
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
491
diff
changeset
|
16 } xs_md5state_t; |
4 | 17 |
660
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
18 #define XS_MD5HASH_LENGTH (16) |
b0743dc9165d
Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents:
657
diff
changeset
|
19 #define XS_MD5HASH_LENGTH_CH (XS_MD5HASH_LENGTH * 2) |
14
f5d82424b0ed
Made song-length database support FINALLY work!
Matti Hamalainen <ccr@tnsp.org>
parents:
4
diff
changeset
|
20 |
657
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
491
diff
changeset
|
21 typedef guint8 xs_md5hash_t[XS_MD5HASH_LENGTH]; |
14
f5d82424b0ed
Made song-length database support FINALLY work!
Matti Hamalainen <ccr@tnsp.org>
parents:
4
diff
changeset
|
22 |
4 | 23 |
491
a3fdd2d6c056
Changed the MD5 implementation, the previous had a license that was somewhat
Matti Hamalainen <ccr@tnsp.org>
parents:
379
diff
changeset
|
24 /* Functions |
4 | 25 */ |
657
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
491
diff
changeset
|
26 void xs_md5_init(xs_md5state_t *ctx); |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
491
diff
changeset
|
27 void xs_md5_append(xs_md5state_t *ctx, const guint8 *buf, guint len); |
acaba070cf49
Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
Matti Hamalainen <ccr@tnsp.org>
parents:
491
diff
changeset
|
28 void xs_md5_finish(xs_md5state_t *ctx, xs_md5hash_t digest); |
4 | 29 |
30 | |
31 #ifdef __cplusplus | |
32 } | |
33 #endif | |
34 #endif /* XS_MD5_H */ |