вторник, 24 апреля 2012 г.

CryptoPP hang on linux

After porting some code that use cryptopp from windows to slackware linux it hangs.
The hang code:
AutoSeededRandomPool rng(true);

The reason was that AutoSeededRandomPool use /dev/random which blocks until the data become available.
The problem was resolved using default constructor, which use /dev/urandom:
AutoSeededRandomPool rng;

Комментариев нет:

Отправить комментарий