Files
TwoFactorAuth/lib/Providers/Rng/CSRNGProvider.php
T
Nicolas CARPi aeb4b00c60 first batch
2022-12-07 22:28:52 +01:00

23 lines
381 B
PHP

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