function GenerateRandomString($Length) {
$Length /= 2;
$cstrong = false;
while ($cstrong != TRUE){
$bytes = openssl_random_pseudo_bytes($Length, $cstrong);
}
$hex = bin2hex($bytes);
return $hex;
}
Is this a good function for generating a cryptographically secure random string? Is there a chance, that it'll get into an infinite loop, because $cstrong$cstrong stays 'False'?