Files
TwoFactorAuth/lib/Providers/Rng/CSRNGProvider.php
T
Nicolas CARPi d1792f07d1 remove insecure rng providers
and remove the openssl provider. We now rely exclusively on
random_bytes(), as there are no reasons not to. Fix #121
2024-04-15 23:28:45 +02:00

17 lines
282 B
PHP

<?php
declare(strict_types=1);
namespace RobThree\Auth\Providers\Rng;
class CSRNGProvider implements IRNGProvider
{
/**
* {@inheritdoc}
*/
public function getRandomBytes(int $bytecount): string
{
return random_bytes($bytecount); // PHP7+
}
}