oDongTianShuiYue 2019-05-01
CSPRNG 函数提供一种简单的机制来生成密码的随机数.
random_bytes() -加密生存被保护的伪随机字符串.
random_int() -加密生存被保护的伪随机整数.
实例:
<?php
$bytes = random_bytes(8);
echo(bin2hex($bytes));//随机2073a110a2e3c497
echo '<br>';
echo(random_int(1, 999));//随机786
echo '<br>';
print(random_int(-999, -1));//随机-357
<?php. if (!empty($_POST)) {. $data1 = $_POST["data1"];$data2 = $_POST["data2"];$fuhao = $_POST["fuh