comparison src/protocols/msn/user.c @ 11183:8dca96cbcd64

[gaim-migrate @ 13295] I changed the cipher API to use guchar instead of guint8 This seems to be what gtk/glib uses for random bits of data I don't know what got into me committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 03 Aug 2005 02:57:00 +0000
parents 93663df88ec4
children 45d54425dc65
comparison
equal deleted inserted replaced
11182:5389d7d497ce 11183:8dca96cbcd64
202 202
203 /* Compute the SHA1D field. */ 203 /* Compute the SHA1D field. */
204 memset(digest, 0, sizeof(digest)); 204 memset(digest, 0, sizeof(digest));
205 205
206 ctx = gaim_cipher_context_new_by_name("sha1", NULL); 206 ctx = gaim_cipher_context_new_by_name("sha1", NULL);
207 gaim_cipher_context_append(ctx, (const guint8 *)buf, st.st_size); 207 gaim_cipher_context_append(ctx, (const guchar *)buf, st.st_size);
208 gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL); 208 gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL);
209 g_free(buf); 209 g_free(buf);
210 210
211 base64 = gaim_base64_encode(digest, sizeof(digest)); 211 base64 = gaim_base64_encode(digest, sizeof(digest));
212 msn_object_set_sha1d(msnobj, base64); 212 msn_object_set_sha1d(msnobj, base64);
225 msn_object_get_sha1d(msnobj)); 225 msn_object_get_sha1d(msnobj));
226 226
227 memset(digest, 0, sizeof(digest)); 227 memset(digest, 0, sizeof(digest));
228 228
229 gaim_cipher_context_reset(ctx, NULL); 229 gaim_cipher_context_reset(ctx, NULL);
230 gaim_cipher_context_append(ctx, (const guint8 *)buf, strlen(buf)); 230 gaim_cipher_context_append(ctx, (const guchar *)buf, strlen(buf));
231 gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL); 231 gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL);
232 gaim_cipher_context_destroy(ctx); 232 gaim_cipher_context_destroy(ctx);
233 g_free(buf); 233 g_free(buf);
234 234
235 base64 = gaim_base64_encode(digest, sizeof(digest)); 235 base64 = gaim_base64_encode(digest, sizeof(digest));