/**
  * Validate the user password
  *
  * @author Arvind Singh
  * @access public
  *
  * @param string $password
  *            // Password string
  *
  * @param string $hash
  *            // Hash string
  *
  * @return boolean
  */
 public function verify($password, $hash)
 {
     if ($this->method == 'md5') {
         return $hash == md5($this->salt . $password);
     } elseif ($this->method == 'sha1') {
         return $hash == sha1($this->salt . $password);
     } elseif ($this->method == 'bcrypt') {
         $bcrypt = new Bcrypt();
         $bcrypt->setCost(14);
         return $bcrypt->verify($password, $hash);
     }
 }