Changeset 4787:6f1eddd188c1 in roaraudio


Ignore:
Timestamp:
03/11/11 03:02:58 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_authfile_key_new_random()

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/authfile.h

    r4708 r4787  
    7777struct roar_authfile_key * roar_authfile_lookup_key(struct roar_authfile * authfile, int type, int minindex, const char * address); 
    7878 
     79struct roar_authfile_key * roar_authfile_key_new_random(int type, size_t len, const char * addr); 
     80 
    7981#endif 
    8082 
  • libroar/authfile.c

    r4786 r4787  
    263263} 
    264264 
     265struct roar_authfile_key * roar_authfile_key_new_random(int type, size_t len, const char * addr) { 
     266 struct roar_authfile_key * ret = roar_authfile_key_new(type, len, addr); 
     267 
     268 if ( ret == NULL ) 
     269  return NULL; 
     270 
     271 roar_random_gen_nonce(ret->data, ret->len); 
     272 
     273 return ret; 
     274} 
     275 
    265276//ll 
Note: See TracChangeset for help on using the changeset viewer.