Example #1
0
 /**
  * {@inheritDoc}
  */
 public function make($value)
 {
     $salt = Random::string($this->saltLength);
     // Prefix "$2y$" fixes blowfish weakness
     $prefix = '$2y$';
     return crypt($value, $prefix . $this->strength . '$' . $salt . '$');
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function make($value)
 {
     $salt = Random::string($this->saltLength);
     return $salt . hash('sha512', $salt . $value);
 }