diff options
author | Mikko Juola <mikko.juola@kolumbus.fi> | 2009-10-01 14:37:49 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2009-10-01 14:42:06 +0530 |
commit | fb49425915aef7877fedfc58730cef8bcf58aee7 (patch) | |
tree | 32a12f676185d673ce1b4091b9aff57e5c22ad83 /crawl-ref/source/AppHdr.h | |
parent | f44f2bc6f575f26209d70243fb9ca7a07893bc59 (diff) | |
download | crawl-ref-fb49425915aef7877fedfc58730cef8bcf58aee7.tar.gz crawl-ref-fb49425915aef7877fedfc58730cef8bcf58aee7.zip |
Harden the PRNG for public servers.
Detailed discussion is here: http://www.genodeen.net/index.clua?cwrng
Signed-off-by: Darshan Shaligram <dshaligram@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/AppHdr.h')
-rw-r--r-- | crawl-ref/source/AppHdr.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/AppHdr.h b/crawl-ref/source/AppHdr.h index b4fea9cd14..385d4827a6 100644 --- a/crawl-ref/source/AppHdr.h +++ b/crawl-ref/source/AppHdr.h @@ -226,6 +226,16 @@ // #define DGL_CLEAR_SCREEN "\033[2J" +# ifndef USE_MORE_SECURE_SEED +# error DGAMELAUNCH builds should define USE_MORE_SECURE_SEED +# endif + + // This secures the PRNG itself by hashing the values with SHA256. + // It doesn't have much point if USE_MORE_SECURE_SEED is not used. + // PRNG will be about 15 times slower when this is turned on, but + // even with that the cpu time used by the PRNG is relatively small. + #define MORE_HARDENED_PRNG + // Startup preferences are saved by player name rather than uid, // since all players use the same uid in dgamelaunch. #ifndef DGL_NO_STARTUP_PREFS_BY_NAME |