mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
Move random Digits to Crypto class
This commit is contained in:
parent
0472c7b57d
commit
6e10bdf361
8 changed files with 167 additions and 17 deletions
10
boot.php
10
boot.php
|
@ -673,16 +673,6 @@ function curPageURL()
|
|||
return $pageURL;
|
||||
}
|
||||
|
||||
function random_digits($digits)
|
||||
{
|
||||
$rn = '';
|
||||
for ($i = 0; $i < $digits; $i++) {
|
||||
/// @TODO Avoid rand/mt_rand, when it comes to cryptography, they are generating predictable (seedable) numbers.
|
||||
$rn .= rand(0, 9);
|
||||
}
|
||||
return $rn;
|
||||
}
|
||||
|
||||
function get_server()
|
||||
{
|
||||
$server = Config::get("system", "directory");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue