From 2daf6ae2495c862adf8bc717bfe9964081ea0b10 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 20 Feb 2012 19:54:16 +0100 Subject: 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. --- Include/pythonrun.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Include/pythonrun.h') 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 } -- cgit v1.2.3