We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6108021 commit eafbeeeCopy full SHA for eafbeee
mcrypt.c
@@ -38,7 +38,11 @@
38
#include "php_ini.h"
39
#include "php_globals.h"
40
#include "ext/standard/info.h"
41
-#include "ext/standard/php_rand.h"
+#if PHP_VERSION_ID >= 80400
42
+# include "ext/random/php_random.h"
43
+#else
44
+# include "ext/standard/php_rand.h"
45
+#endif
46
#include "zend_smart_str.h"
47
#include "php_mcrypt_filter.h"
48
@@ -1414,7 +1418,11 @@ PHP_FUNCTION(mcrypt_create_iv)
1414
1418
} else {
1415
1419
n = (int)size;
1416
1420
while (size) {
1421
1422
+ iv[--size] = (char) (255.0 * php_mt_rand() / RAND_MAX);
1423
1417
1424
iv[--size] = (char) (255.0 * php_rand() / RAND_MAX);
1425
1426
}
1427
1428
RETVAL_STRINGL(iv, n);
0 commit comments