11<?php declare (strict_types=1 );
22
3- /**
4- * This file contains unit test for the CandID value object.
5- *
6- * PHP Version 7
7- *
8- * @category Tests
9- * @package StudyEntities
10- * @author Xavier Lecours <[email protected] > 11- * @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3
12- * @link https://www.github.com/aces/Loris/
13- */
143namespace LORIS \Security ;
154
165require_once __DIR__ . '/../../../vendor/autoload.php ' ;
198use \LORIS \Security \OTP \TOTP ;
209
2110/**
22- * Unit test class for the CandID value object
23- *
24- * PHP Version 7
11+ * Unit test class for Time-based One Time Passwords (TOTP)
12+ * primarily based on RFC6238
2513 *
26- * @category Tests
27- * @package StudyEntities
28- * @author Xavier Lecours <[email protected] > 29- * @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3
30- * @link https://www.github.com/aces/Loris/
14+ * @license http://www.gnu.org/licenses/gpl-3.0.txt GPLv3
3115 */
3216class TOTP_Test extends TestCase
3317{
@@ -40,7 +24,8 @@ class TOTP_Test extends TestCase
4024 function testRFC6238Counters () : void
4125 {
4226 $ totp = new TOTP ("abc " , timestep: 30 );
43- // Unix time => RFC6238 time based counter for HOTP
27+ // Unix time => RFC6238 time based counter to pass to HOTP
28+ // algorithm.
4429 $ validValues = [
4530 59 => hexdec ("0000000000000001 " ),
4631 1111111109 => hexdec ("00000000023523EC " ),
0 commit comments