Exemplo n.º 1
0
 protected function generateSalt()
 {
     $salt = parent::generateSalt();
     $prefix = static::getPrefix();
     $prefix .= str_pad($this->iterations, 2, '0', STR_PAD_LEFT);
     return $prefix . '$' . $salt;
 }
Exemplo n.º 2
0
 protected function generateSalt()
 {
     $salt = parent::generateSalt();
     return '$5$rounds=' . $this->options['rounds'] . '$' . $salt;
 }
Exemplo n.º 3
0
 /**
  * @covers PasswordLib\Password\Implementation\Crypt
  */
 public function testCreateAndVerify()
 {
     $hash = new Crypt(10);
     $test = $hash->create('Foobar');
     $this->assertTrue($hash->verify('Foobar', $test));
 }
Exemplo n.º 4
0
 protected function generateSalt()
 {
     $salt = parent::generateSalt();
     return '$1$' . $salt;
 }
Exemplo n.º 5
0
 protected function generateSalt()
 {
     $salt = parent::generateSalt();
     return '$6$rounds=' . $this->iterations . '$' . $salt;
 }