comparison src/protocols/msn/user.c @ 10687:b256ce6b85b8

[gaim-migrate @ 12235] grim says this is really fixed this time. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Sat, 12 Mar 2005 01:10:37 +0000
parents 72a5babfa8b4
children 93663df88ec4
comparison
equal deleted inserted replaced
10686:212946f774c0 10687:b256ce6b85b8
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, buf, st.st_size); 207 gaim_cipher_context_append(ctx, buf, st.st_size);
208 gaim_cipher_context_digest(ctx, NULL, digest); 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);
213 g_free(base64); 213 g_free(base64);
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, buf, strlen(buf)); 230 gaim_cipher_context_append(ctx, buf, strlen(buf));
231 gaim_cipher_context_digest(ctx, NULL, digest); 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));
236 msn_object_set_sha1c(msnobj, base64); 236 msn_object_set_sha1c(msnobj, base64);