-
- Downloads
Use a XOR cipher instead of byte shuffling to protect against bad seeds.
libgfortran: 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org> * intrinsics/random.c (xor_keys): New array with "secret" keys. (scramble_seed): XOR given seed with xor_keys array rather than shuffling bytes. (unscramble_seed): Remove function. (random_seed_i4): Use new scramble_seed. (random_seed_i8): Likewise. frontend: 2016-08-19 Janne Blomqvist <jb@gcc.gnu.org> * intrinsics.texi (RANDOM_NUMBER): Remove reference to init_random_seed in example. (RANDOM_SEED): Remove warning to not set all seed values to 0. From-SVN: r239613
Showing
- gcc/fortran/ChangeLog 6 additions, 0 deletionsgcc/fortran/ChangeLog
- gcc/fortran/intrinsic.texi 0 additions, 4 deletionsgcc/fortran/intrinsic.texi
- libgfortran/ChangeLog 10 additions, 1 deletionlibgfortran/ChangeLog
- libgfortran/intrinsics/random.c 31 additions, 22 deletionslibgfortran/intrinsics/random.c
Loading
Please register or sign in to comment