Don't use /dev/random anymore
Display help if parsing arguments fails git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@197 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
@@ -22,40 +22,9 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#if defined(Q_WS_X11) || defined(Q_WS_MAC)
|
||||
#define HAS_DEV_RANDOM
|
||||
#include <QThread>
|
||||
#endif
|
||||
|
||||
class RandomSource : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RandomSource();
|
||||
|
||||
private:
|
||||
static void getRandomWeak(quint8* buffer, int length);
|
||||
|
||||
#ifdef HAS_DEV_RANDOM
|
||||
private slots:
|
||||
void seedStrong(int source, QByteArray buffer, int length);
|
||||
#endif
|
||||
namespace Random {
|
||||
void getEntropy(quint8* buffer, int length);
|
||||
void initStdRand();
|
||||
};
|
||||
|
||||
#ifdef HAS_DEV_RANDOM
|
||||
class DevRandom : public QThread {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DevRandom(QObject* parent = 0);
|
||||
void run();
|
||||
|
||||
signals:
|
||||
void randomAvailable(int source, QByteArray buffer, int length);
|
||||
|
||||
private:
|
||||
static bool getRandomStrong(quint8* buffer, int length);
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user