Move random Digits to Crypto class

This commit is contained in:
Philipp Holzer 2018-11-05 09:37:03 +01:00
parent 0472c7b57d
commit 6e10bdf361
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
8 changed files with 167 additions and 17 deletions

View file

@ -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");