Files
TwoFactorAuth/lib/Providers/Rng/CSRNGProvider.php
T
RobThree c94fcd83d8 * Added new (PHP7+) CSRNGProvider (uses random_bytes)
* 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
2015-12-02 16:38:20 +01:00

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;
}
}