v1.0 Initial commit of project
This commit is contained in:
16
vendor/robthree/twofactorauth/lib/Providers/Rng/CSRNGProvider.php
vendored
Normal file
16
vendor/robthree/twofactorauth/lib/Providers/Rng/CSRNGProvider.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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+
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user