title: Using PHPass to hash passwords in Codeigniter
body: <p>Just want to use <a href="http://www.openwall.com/phpass/" rel="nofollow">PHPass</a> in Codeigniter to hash the password. I downloaded the zip file from phpass website, extracted the content, and copied the PasswordHash.php file into my libraries folder.</p>
  
  <p>Then I loaded that library in my controller and tried to hash password but it gave following errors</p>
  
  <pre><code>Missing argument 1 for PasswordHash::PasswordHash(), called in ...
  Missing argument 2 for PasswordHash::PasswordHash(), called in ...
  Undefined variable: iteration_count_log2 ...
  Undefined variable: portable_hashes ...
  </code></pre>
  
  <p>Please check my controller code below and help me to find the mistake:</p>
  
  <pre><code>$this-&gt;load-&gt;library('PasswordHash');
  $password = $this-&gt;input-&gt;post('password');
  $hash = $this-&gt;passwordhash-&gt;HashPassword( $password );
  </code></pre>