/** * Create Password * * @author Arvind Singh * @access public * * @param string $password * User Password * @return string */ public function create($password) { if ($this->method == 'md5') { return md5($this->salt . $password); } elseif ($this->method == 'sha1') { return sha1($this->salt . $password); } elseif ($this->method == 'bcrypt') { $bcrypt = new Bcrypt(); $bcrypt->setCost(14); return $bcrypt->create($password); } }