annotate src/xs_md5.h @ 660:b0743dc9165d

Change tabs to 4 spaces, everywhere.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 02 Apr 2008 22:10:05 +0300
parents acaba070cf49
children 4bf845090a25
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
214
575686094eb1 Portability fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 14
diff changeset
4 #include <glib.h>
575686094eb1 Portability fixes
Matti Hamalainen <ccr@tnsp.org>
parents: 14
diff changeset
5
4
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 #ifdef __cplusplus
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 extern "C" {
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 #endif
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 */
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 #ifdef __cplusplus
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 #endif
4bb09e405eab Added new files for 0.8
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 #endif /* XS_MD5_H */