mirror of
https://github.com/RobThree/TwoFactorAuth.git
synced 2026-11-26 14:05:00 +00:00
194ecc28eb
* 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 * remove the isSecure property of the test rng class * remove pointless test rng class we were testing a test class, which didn't make a lot of sense. * Revert "remove pointless test rng class" This reverts commitf6da6bee6d. * Reapply "remove pointless test rng class" This reverts commit06220d4a54. * assing rng provider to class attribute this also aligns with other providers * remove polyfill for hash_equals
19 lines
392 B
PHP
19 lines
392 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Providers\Rng;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use RobThree\Auth\Algorithm;
|
|
use RobThree\Auth\TwoFactorAuth;
|
|
|
|
class IRNGProviderTest extends TestCase
|
|
{
|
|
public function testCreateSecret(): void
|
|
{
|
|
$tfa = new TwoFactorAuth('Test', 6, 30, Algorithm::Sha1, null, null);
|
|
$this->assertIsString($tfa->createSecret());
|
|
}
|
|
}
|