Mercurial > pidgin
diff src/protocols/jabber/buddy.c @ 10684:72a5babfa8b4
[gaim-migrate @ 12231]
the cipher api that grim has been working on for ages is finally done!! big
congrats and thanks to him!!
lots of modified files in this commit. it builds here.
moved the md5 files to src/protocols/oscar so that it continues to depend
on nothing in gaim. everything else uses the new centralized cipher api.
I'm not sure if src/md5.* needs to be removed or not, so I left it there.
someone let me know or do it directly.
someone check if these need to be added to potfiles.in
and let there be much rejoicing!
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 11 Mar 2005 13:05:31 +0000 |
parents | 54ac161a876e |
children | b256ce6b85b8 |
line wrap: on
line diff
--- a/src/protocols/jabber/buddy.c Fri Mar 11 04:13:27 2005 +0000 +++ b/src/protocols/jabber/buddy.c Fri Mar 11 13:05:31 2005 +0000 @@ -19,6 +19,7 @@ * */ #include "internal.h" +#include "cipher.h" #include "debug.h" #include "imgstore.h" #include "prpl.h" @@ -32,8 +33,6 @@ #include "jabber.h" #include "iq.h" #include "presence.h" -#include "sha.h" - void jabber_buddy_free(JabberBuddy *jb) { @@ -393,7 +392,10 @@ photo = xmlnode_new_child(vc_node, "PHOTO"); enc = gaim_base64_encode(avatar_data, avatar_len); - shaBlock((unsigned char *)avatar_data, avatar_len, hashval); + + gaim_cipher_digest_region("sha1", (guint8 *)avatar_data, + avatar_len, hashval, NULL); + p = hash; for(i=0; i<20; i++, p+=2) snprintf(p, 3, "%02x", hashval[i]); @@ -817,7 +819,8 @@ gaim_buddy_icons_set_for_user(js->gc->account, bare_jid, data, size); - shaBlock((unsigned char *)data, size, hashval); + gaim_cipher_digest_region("sha1", (guint8 *)data, size, + hashval, NULL); p = hash; for(i=0; i<20; i++, p+=2) snprintf(p, 3, "%02x", hashval[i]);