public function test_cost_should_be_converted_to_string_with_leading_zero_if_single_digit()
 {
     $hasher = new PasswordHasher(7);
     $hashed = $hasher->hash('password');
     $algoCost = substr($hashed, 0, 7);
     $this->assertEquals('$2y$07$', $algoCost);
 }
Esempio n. 2
0
 public function refreshIdentifier()
 {
     $hasher = new PasswordHasher();
     $this->setIdentifier($hasher->hash($this->getUsername()));
 }