Mercurial > pidgin.yaz
comparison src/protocols/trepia/trepia.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 | 096020ae09a9 |
children | bb0d7b719af2 |
comparison
equal
deleted
inserted
replaced
11182:5389d7d497ce | 11183:8dca96cbcd64 |
---|---|
982 char *mac = "00:01:02:03:04:05"; | 982 char *mac = "00:01:02:03:04:05"; |
983 char buf[3]; | 983 char buf[3]; |
984 char md5_password[17]; | 984 char md5_password[17]; |
985 GaimCipher *cipher; | 985 GaimCipher *cipher; |
986 GaimCipherContext *context; | 986 GaimCipherContext *context; |
987 guint8 di[16]; | 987 guchar di[16]; |
988 int i; | 988 int i; |
989 | 989 |
990 if (source < 0) { | 990 if (source < 0) { |
991 gaim_connection_error(session->gc, _("Write error")); | 991 gaim_connection_error(session->gc, _("Write error")); |
992 return; | 992 return; |
1002 | 1002 |
1003 password = gaim_connection_get_password(session->gc); | 1003 password = gaim_connection_get_password(session->gc); |
1004 | 1004 |
1005 cipher = gaim_ciphers_find_cipher("md5"); | 1005 cipher = gaim_ciphers_find_cipher("md5"); |
1006 context = gaim_cipher_context_new(cipher, NULL); | 1006 context = gaim_cipher_context_new(cipher, NULL); |
1007 gaim_cipher_context_append(context, password, strlen(password)); | 1007 gaim_cipher_context_append(context, (const guchar *)password, strlen(password)); |
1008 gaim_cipher_context_digest(context, sizeof(di), di, NULL); | 1008 gaim_cipher_context_digest(context, sizeof(di), di, NULL); |
1009 | 1009 |
1010 *md5_password = '\0'; | 1010 *md5_password = '\0'; |
1011 | 1011 |
1012 for (i = 0; i < 16; i++) { | 1012 for (i = 0; i < 16; i++) { |