title: Codeigniter - Login using the encrypt library
body: <p>I have created a signup form using the codeigniter encryption library to store the users passwords as follow:</p>
  
  <pre><code>$encrypted_password = $this-&gt;encrypt-&gt;encode($this-&gt;input-&gt;post('password')); 
  </code></pre>
  
  <p>I have notice that each time we encrypt (event if we encrypt the same password) the encryption function it produce a different output.</p>
  
  <p>My question is the follow:
  What is the best way to compare the two encrypted passwords when the user try to login on the system as we know that each time we encrypt we get a different encrypted string?</p>