Changeset a7b5925 for storage_xml.c
- Timestamp:
- 2007-10-07T20:42:37Z (17 years ago)
- Branches:
- master
- Children:
- 2305488
- Parents:
- 9334cc2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
storage_xml.c
r9334cc2 ra7b5925 27 27 #include "bitlbee.h" 28 28 #include "base64.h" 29 #include " rc4.h"29 #include "arc.h" 30 30 #include "md5.h" 31 31 … … 133 133 char *protocol, *handle, *server, *password = NULL, *autoconnect; 134 134 char *pass_b64 = NULL; 135 unsigned char *pass_ rc4= NULL;135 unsigned char *pass_cr = NULL; 136 136 int pass_len; 137 137 struct prpl *prpl = NULL; … … 152 152 g_set_error( error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, 153 153 "Unknown protocol: %s", protocol ); 154 else if( ( pass_len = base64_decode( pass_b64, (unsigned char**) &pass_ rc4) ) &&155 rc4_decode( pass_rc4, pass_len, &password, xd->given_pass ) )154 else if( ( pass_len = base64_decode( pass_b64, (unsigned char**) &pass_cr ) ) && 155 arc_decode( pass_cr, pass_len, &password, xd->given_pass ) ) 156 156 { 157 157 xd->current_account = account_add( irc, prpl, handle, password ); … … 169 169 } 170 170 171 g_free( pass_ rc4);171 g_free( pass_cr ); 172 172 g_free( password ); 173 173 } … … 424 424 for( acc = irc->accounts; acc; acc = acc->next ) 425 425 { 426 unsigned char *pass_ rc4;426 unsigned char *pass_cr; 427 427 char *pass_b64; 428 428 int pass_len; 429 429 430 pass_len = rc4_encode( acc->pass, strlen( acc->pass ), (unsigned char**) &pass_rc4, irc->password );431 pass_b64 = base64_encode( pass_ rc4, pass_len );432 g_free( pass_ rc4);430 pass_len = arc_encode( acc->pass, strlen( acc->pass ), (unsigned char**) &pass_cr, irc->password ); 431 pass_b64 = base64_encode( pass_cr, pass_len ); 432 g_free( pass_cr ); 433 433 434 434 if( !xml_printf( fd, 1, "<account protocol=\"%s\" handle=\"%s\" password=\"%s\" autoconnect=\"%d\"", acc->prpl->name, acc->user, pass_b64, acc->auto_connect ) )
Note: See TracChangeset
for help on using the changeset viewer.