Code Coverage  | 
     ||||||||||
Classes and Traits  | 
      Functions and Methods  | 
      Lines  | 
     ||||||||
| Total |         | 
      0.00%  | 
      0 / 1  | 
              | 
      0.00%  | 
      0 / 2  | 
      CRAP |         | 
      0.00%  | 
      0 / 4  | 
     
| SessionIdMicroTime |         | 
      0.00%  | 
      0 / 1  | 
              | 
      0.00%  | 
      0 / 2  | 
      6 |         | 
      0.00%  | 
      0 / 4  | 
     
| __construct |         | 
      0.00%  | 
      0 / 1  | 
      2 |         | 
      0.00%  | 
      0 / 2  | 
     |||
| createToken |         | 
      0.00%  | 
      0 / 1  | 
      2 |         | 
      0.00%  | 
      0 / 2  | 
     |||
| <?php | |
| namespace Puyo\Security\Csrf\Strategy; | |
| /** | |
| * セッションID + microtime() のSHA-256。(ワンタイム) | |
| * | |
| * 強度に問題があると考える場合は別のものを使うこと。 | |
| * @package Puyo\Security\Csrf\Strategy | |
| */ | |
| class SessionIdMicroTime extends SessionIdAbstract | |
| { | |
| public function __construct() { | |
| parent::__construct(); | |
| } | |
| /** | |
| * @return string | |
| */ | |
| public function createToken() { | |
| return hash('sha256', session_id() . microtime()); | |
| } | |
| } |