From e60091ae65f5982c762a82b7266778db43ebeb57 Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Wed, 11 Oct 2023 08:18:13 +0800 Subject: [PATCH] Sync random functions and crypt --- reference/random/functions/mt-getrandmax.xml | 30 ++------------------ reference/random/functions/mt-rand.xml | 3 +- reference/strings/functions/crypt.xml | 4 +-- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/reference/random/functions/mt-getrandmax.xml b/reference/random/functions/mt-getrandmax.xml index 5ec61a21ca..d26f049b32 100644 --- a/reference/random/functions/mt-getrandmax.xml +++ b/reference/random/functions/mt-getrandmax.xml @@ -1,7 +1,7 @@ - - + + mt_getrandmax @@ -30,32 +30,6 @@ max 参数而不是放大结果的最大值(更少的随机)。 - - &reftitle.examples; - - 计算一个随机浮点数 - - -]]> - - &example.outputs.similar; - - - - - - &reftitle.seealso; diff --git a/reference/random/functions/mt-rand.xml b/reference/random/functions/mt-rand.xml index 20f1eb4c0d..1dc3369474 100644 --- a/reference/random/functions/mt-rand.xml +++ b/reference/random/functions/mt-rand.xml @@ -1,6 +1,6 @@ - + @@ -149,7 +149,6 @@ echo mt_rand(5, 15), "\n"; mt_getrandmax random_int random_bytes - rand diff --git a/reference/strings/functions/crypt.xml b/reference/strings/functions/crypt.xml index 3dd4ed2c86..f891a3344a 100644 --- a/reference/strings/functions/crypt.xml +++ b/reference/strings/functions/crypt.xml @@ -1,6 +1,6 @@ - + @@ -155,7 +155,7 @@ $user_input = 'rasmuslerdorf'; $hashed_password = '$6$rounds=1000000$NJy4rIPjpOaU$0ACEYGg/aKCY3v8O8AfyiO7CTfZQ8/W231Qfh2tRLmfdvFD6XfHk12u6hMr9cYIA4hnpjLNSTRtUwYr9km9Ij/'; -// 验证现有的 crypt() 哈希值,以便与非 PHP 软件兼容。 +// 以与非 PHP 软件兼容的方式验证现有的 crypt() 哈希值。 if (hash_equals($hashed_password, crypt($user_input, $hashed_password))) { echo "Password verified!"; }