mirror of
https://github.com/RobThree/TwoFactorAuth.git
synced 2026-08-17 18:55:48 +00:00
c94fcd83d8
* Added a bunch basic of unittests for the RNG's * QRicketProvider and QRServerProvider now throw on invalid MIME-types * TwoFactorAuth now first tries to use CSRNGProvider before any of the other RNG providers
14 lines
284 B
PHP
14 lines
284 B
PHP
<?php
|
|
|
|
namespace RobThree\Auth\Providers\Rng;
|
|
|
|
class CSRNGProvider implements IRNGProvider
|
|
{
|
|
public function getRandomBytes($bytecount) {
|
|
return random_bytes($bytecount); // PHP7+
|
|
}
|
|
|
|
public function isCryptographicallySecure() {
|
|
return true;
|
|
}
|
|
} |