Changeset 1719464 for storage_xml.c


Ignore:
Timestamp:
2006-06-28T14:47:05Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
5c9512f
Parents:
b3c467b
Message:

Added random_bytes() function for better/more reliable randomization and
moved set_eval_ops() to a slightly more suitable place.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage_xml.c

    rb3c467b r1719464  
    371371        nick_t *nick;
    372372        account_t *acc;
    373         int fd, i;
     373        int fd;
    374374        md5_byte_t pass_md5[21];
    375375        md5_state_t md5_state;
     
    396396           (to prevent dictionary lookups of passwords) to end up with a 21-
    397397           byte password hash, more convenient for base64 encoding. */
    398         for( i = 0; i < 5; i ++ )
    399                 pass_md5[16+i] = rand() & 0xff;
     398        random_bytes( pass_md5 + 16, 5 );
    400399        md5_init( &md5_state );
    401400        md5_append( &md5_state, (md5_byte_t*) irc->password, strlen( irc->password ) );
Note: See TracChangeset for help on using the changeset viewer.