Changeset 2590


Ignore:
Timestamp:
Oct 25, 2011, 11:46:15 PM (10 years ago)
Author:
Peter
Message:

read /dev/urandom as binary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/random/random.cc

    r2589 r2590  
    9595    unsigned char ulongsize=sizeof(unsigned long);
    9696    char* buffer=new char[ulongsize];
    97     std::ifstream is("/dev/urandom");
     97    std::ifstream is("/dev/urandom", std::ios::binary);
    9898    is.read(buffer,ulongsize);
    9999    is.close();
Note: See TracChangeset for help on using the changeset viewer.