public function hashPassword($password)
    {
        if ($this->mode == self::MODE_BCRYPT) {
            return $this->hashModeBcrypt($password);
        } elseif ($this->mode == self::MODE_PBKDF2) {
            return $this->hashModePbkdf2($password);
        }

        $this->error = 'You have to set the mode...';
        $this->cwsDebug->error($this->error);
    }
public function hashPassword($password)
    {
        if ($this->mode == self::MODE_BCRYPT) {
            return $this->hashModeBcrypt($password);
        } elseif ($this->mode == self::MODE_PBKDF2) {
            return $this->hashModePbkdf2($password);
        }

        $this->error = 'You have to set the mode...';
        $this->cwsDebug->error($this->error);
    }
public function hashPassword ( $ password ) { if ( $ this -> mode == self :: MODE_BCRYPT ) { return $ this -> hashModeBcrypt ( $ password ) ; } elseif ( $ this -> mode == self :: MODE_PBKDF2 ) { return $ this -> hashModePbkdf2 ( $ password ) ; } $ this -> error = 'You have to set the mode...' ; $ this -> cwsDebug -> error ( $ this -> error ) ; }
Create a password hash.

@param string $password : The password

@return string|null
Create a password hash .