createPasswordHash() public method

Create a hash for the given password.
public createPasswordHash ( string $password ) : string
$password string
return string Password hash.
Ejemplo n.º 1
0
 /**
  * Create a hash for the given password.
  *
  * @param string $password
  *
  * @return string Password hash.
  */
 public function createPasswordHash($password)
 {
     return $this->encoder->createPasswordHash($password);
 }
Ejemplo n.º 2
0
 public function testCreatePasswordHash()
 {
     $encoder = new Encoder('\\Webiny\\Component\\Security\\Tests\\Mocks\\EncoderMock');
     $this->assertSame('password', $encoder->createPasswordHash('password'));
     // since we use the mock encoder, there is no hashing
 }