diff options
author | Georg Brandl <georg@python.org> | 2012-02-20 19:54:16 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2012-02-20 19:54:16 +0100 |
commit | 2daf6ae2495c862adf8bc717bfe9964081ea0b10 (patch) | |
tree | ebd7efe668e4f7842c6d51bdbde47b00f92a57db /Include/pythonrun.h | |
parent | ec1712a1662282c909b4cd4cc0c7486646bc9246 (diff) | |
download | cpython-git-2daf6ae2495c862adf8bc717bfe9964081ea0b10.tar.gz |
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.
Diffstat (limited to 'Include/pythonrun.h')
-rw-r--r-- | Include/pythonrun.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/pythonrun.h b/Include/pythonrun.h index 96a0e232f9..af4aa0877e 100644 --- a/Include/pythonrun.h +++ b/Include/pythonrun.h @@ -174,6 +174,8 @@ typedef void (*PyOS_sighandler_t)(int); 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 } |