Webiny\Component\Crypt\Crypt::createPasswordHash PHP Method

createPasswordHash() public method

The hashing algorithm used depends on your config.
public createPasswordHash ( string $password ) : string
$password string String you wish to hash.
return string Hash of the given string.
    public function createPasswordHash($password)
    {
        try {
            return $this->driverInstance->createPasswordHash($password);
        } catch (\Exception $e) {
            throw new CryptException($e->getMessage());
        }
    }

Usage Example

Example #1
0
 /**
  * Create a hash for the given password.
  *
  * @param string $password
  *
  * @return string Password hash.
  */
 public function createPasswordHash($password)
 {
     return $this->instance->createPasswordHash($password);
 }
All Usage Examples Of Webiny\Component\Crypt\Crypt::createPasswordHash