Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
76 | public function validate($value) |
||
77 | { |
||
78 | for (; $this->startTime <= $this->time + $this->cycles; $this->startTime++) { |
||
79 | if (hash_equals($this->oathHotp($this->seed, $this->startTime), $value)) { |
||
80 | return |
||
81 | null === $this->previousTime |
||
82 | ? true |
||
83 | : $this->startTime; |
||
84 | } |
||
85 | } |
||
86 | |||
87 | return false; |
||
88 | } |
||
89 | } |
||
90 |