summaryrefslogtreecommitdiff
path: root/Include/pythonrun.h
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-02-20 19:54:16 +0100
committerGeorg Brandl <georg@python.org>2012-02-20 19:54:16 +0100
commit5af1ccb2a86c32b4a7ed302bd75dd824606fc222 (patch)
tree84cbb3374227066bbf5f8ef77a994eceb4d3a7db /Include/pythonrun.h
parentc3bd9bfd3d1b9af05669f68c08079fed02a28c67 (diff)
downloadcpython-5af1ccb2a86c32b4a7ed302bd75dd824606fc222.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.h2
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
}