Changeset a7b5925 for storage_xml.c


Ignore:
Timestamp:
2007-10-07T20:42:37Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
2305488
Parents:
9334cc2
Message:

Renaming RC4 to ArcFour (possible trademark issues).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage_xml.c

    r9334cc2 ra7b5925  
    2727#include "bitlbee.h"
    2828#include "base64.h"
    29 #include "rc4.h"
     29#include "arc.h"
    3030#include "md5.h"
    3131
     
    133133                char *protocol, *handle, *server, *password = NULL, *autoconnect;
    134134                char *pass_b64 = NULL;
    135                 unsigned char *pass_rc4 = NULL;
     135                unsigned char *pass_cr = NULL;
    136136                int pass_len;
    137137                struct prpl *prpl = NULL;
     
    152152                        g_set_error( error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT,
    153153                                     "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 ) )
    156156                {
    157157                        xd->current_account = account_add( irc, prpl, handle, password );
     
    169169                }
    170170               
    171                 g_free( pass_rc4 );
     171                g_free( pass_cr );
    172172                g_free( password );
    173173        }
     
    424424        for( acc = irc->accounts; acc; acc = acc->next )
    425425        {
    426                 unsigned char *pass_rc4;
     426                unsigned char *pass_cr;
    427427                char *pass_b64;
    428428                int pass_len;
    429429               
    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 );
    433433               
    434434                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.