Changeset 5506:ba21f426f299 in roaraudio


Ignore:
Timestamp:
05/16/12 12:46:52 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Improved random number generator

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r5505 r5506  
    33        * Added support for AutoAppSched to the plugin container. 
    44        * Added simple UUID interface (Closes: #230) 
     5        * Improved random number generator. 
    56 
    67v. 1.0beta1 - Sat May 12 2012 11:49 CEST 
  • libroar/random.c

    r5381 r5506  
    5252} 
    5353 
    54 #define TIGER_BLOCKLEN  55 
     54#define TIGER_BLOCKLEN  64 
    5555#define TIGER_DIGESTLEN (3*8) 
    5656 
     
    6262 
    6363int roar_random_gen_nonce(void * buffer, size_t len) { 
    64  static uint32_t buf[14]; 
     64 static uint32_t buf[TIGER_BLOCKLEN/4]; 
    6565 static int inited = 0; 
    6666 static int idx = 0; 
     
    114114  } 
    115115 
     116  ROAR_DBG("roar_random_gen_nonce(*): buf={0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x, 0x%.8x}", 
     117           (unsigned int)buf[0], (unsigned int)buf[1], (unsigned int)buf[2], (unsigned int)buf[3], (unsigned int)buf[4], (unsigned int)buf[5], (unsigned int)buf[6], (unsigned int)buf[7], (unsigned int)buf[8], (unsigned int)buf[9], (unsigned int)buf[10], (unsigned int)buf[11], (unsigned int)buf[12], (unsigned int)buf[13], (unsigned int)buf[14], (unsigned int)buf[15]); 
     118 
    116119  roar_hash_salted_buffer(off, buf, TIGER_BLOCKLEN, ROAR_HT_TIGER, roar_nonce_salt, roar_nonce_salt_len); 
    117120 
Note: See TracChangeset for help on using the changeset viewer.