Mercurial > pidgin
comparison libpurple/ciphers/gchecksum.c @ 31223:42147e198008
forgot to mark the purple_g_checksum_* api as static again
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Thu, 17 Feb 2011 05:02:31 +0000 |
parents | 2b041e31b825 |
children | ca94413ccd0e |
comparison
equal
deleted
inserted
replaced
31222:1e9425e70a94 | 31223:42147e198008 |
---|---|
1 #include <cipher.h> | 1 #include <cipher.h> |
2 | 2 |
3 #if GLIB_CHECK_VERSION(2,16,0) | 3 #if GLIB_CHECK_VERSION(2,16,0) |
4 | 4 |
5 void | 5 static void |
6 purple_g_checksum_init(PurpleCipherContext *context, GChecksumType type) | 6 purple_g_checksum_init(PurpleCipherContext *context, GChecksumType type) |
7 { | 7 { |
8 GChecksum *checksum; | 8 GChecksum *checksum; |
9 | 9 |
10 checksum = g_checksum_new(type); | 10 checksum = g_checksum_new(type); |
11 purple_cipher_context_set_data(context, checksum); | 11 purple_cipher_context_set_data(context, checksum); |
12 } | 12 } |
13 | 13 |
14 void | 14 static void |
15 purple_g_checksum_reset(PurpleCipherContext *context, GChecksumType type) | 15 purple_g_checksum_reset(PurpleCipherContext *context, GChecksumType type) |
16 { | 16 { |
17 GChecksum *checksum; | 17 GChecksum *checksum; |
18 | 18 |
19 checksum = purple_cipher_context_get_data(context); | 19 checksum = purple_cipher_context_get_data(context); |
26 checksum = g_checksum_new(type); | 26 checksum = g_checksum_new(type); |
27 purple_cipher_context_set_data(context, checksum); | 27 purple_cipher_context_set_data(context, checksum); |
28 #endif | 28 #endif |
29 } | 29 } |
30 | 30 |
31 void | 31 static void |
32 purple_g_checksum_uninit(PurpleCipherContext *context) | 32 purple_g_checksum_uninit(PurpleCipherContext *context) |
33 { | 33 { |
34 GChecksum *checksum; | 34 GChecksum *checksum; |
35 | 35 |
36 checksum = purple_cipher_context_get_data(context); | 36 checksum = purple_cipher_context_get_data(context); |
37 g_return_if_fail(checksum != NULL); | 37 g_return_if_fail(checksum != NULL); |
38 | 38 |
39 g_checksum_free(checksum); | 39 g_checksum_free(checksum); |
40 } | 40 } |
41 | 41 |
42 void | 42 static void |
43 purple_g_checksum_append(PurpleCipherContext *context, const guchar *data, | 43 purple_g_checksum_append(PurpleCipherContext *context, const guchar *data, |
44 gsize len) | 44 gsize len) |
45 { | 45 { |
46 GChecksum *checksum; | 46 GChecksum *checksum; |
47 | 47 |
56 | 56 |
57 if (len) | 57 if (len) |
58 g_checksum_update(checksum, data, len); | 58 g_checksum_update(checksum, data, len); |
59 } | 59 } |
60 | 60 |
61 gboolean | 61 static gboolean |
62 purple_g_checksum_digest(PurpleCipherContext *context, GChecksumType type, | 62 purple_g_checksum_digest(PurpleCipherContext *context, GChecksumType type, |
63 gsize len, guchar *digest, gsize *out_len) | 63 gsize len, guchar *digest, gsize *out_len) |
64 { | 64 { |
65 GChecksum *checksum; | 65 GChecksum *checksum; |
66 const gssize required_length = g_checksum_type_get_length(type); | 66 const gssize required_length = g_checksum_type_get_length(type); |