Mercurial > cpython-lru_cache-weakref
diff Include/pythonrun.h @ 75066:f4b7ecf8a5f8 3.1
Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Mon, 20 Feb 2012 19:54:16 +0100 |
| parents | f57c94073b35 |
| children | 4a31f6b11e7a |
line wrap: on
line diff
--- a/Include/pythonrun.h Sat Feb 18 14:42:57 2012 +0100 +++ b/Include/pythonrun.h Mon Feb 20 19:54:16 2012 +0100 @@ -174,6 +174,8 @@ PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int); PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t); +/* Random */ +PyAPI_FUNC(int) _PyOS_URandom (void *buffer, Py_ssize_t size); #ifdef __cplusplus }
