diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-09-03 09:02:14 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-09-03 09:02:14 +0200 |
commit | 23d4cc1dfa5602c266f2f3d71f845f9ef0789b89 (patch) | |
tree | 44dcdb58630681b09cae87405c5aa68a73dca339 /src | |
parent | 804ff18a6fe18c98259edaed754d77147346a146 (diff) | |
download | mad-23d4cc1dfa5602c266f2f3d71f845f9ef0789b89.tar mad-23d4cc1dfa5602c266f2f3d71f845f9ef0789b89.zip |
AuthBackendChallengeResponse: Don't forget to seed the RNG...
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/AuthBackendChallengeResponse/AuthBackendChallengeResponse.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/AuthBackendChallengeResponse/AuthBackendChallengeResponse.h b/src/modules/AuthBackendChallengeResponse/AuthBackendChallengeResponse.h index 782f441..a32cc98 100644 --- a/src/modules/AuthBackendChallengeResponse/AuthBackendChallengeResponse.h +++ b/src/modules/AuthBackendChallengeResponse/AuthBackendChallengeResponse.h @@ -27,11 +27,12 @@ #include <Common/AuthProvider.h> #include <Common/Application.h> +#include <boost/date_time/posix_time/posix_time.hpp> + #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_int.hpp> #include <boost/random/variate_generator.hpp> - namespace Mad { namespace Modules { namespace AuthBackendChallengeResponse { @@ -80,7 +81,8 @@ class MAD_MODULE_EXPORT AuthBackendChallengeResponse : public Common::AuthBacken public: AuthBackendChallengeResponse(Common::Application *application0) - : application(application0), byteDistribution(0, 255), randomGenerator(rng, byteDistribution) {} + : application(application0), rng(static_cast<boost::uint32_t>(boost::posix_time::microsec_clock::universal_time().time_of_day().total_milliseconds())), + byteDistribution(0, 255), randomGenerator(rng, byteDistribution) {} }; } |