title: Integrate password_compat library
body: <p>This is not my first time using CodeIgniter or Bcrypt, but it is my first time using a <a href="https://github.com/ircmaxell/password_compat" rel="nofollow">specific library of Bcrypt with CodeIgniter.</a> I am having issue integrating thee two together.</p>
  
  <p>Lets get to the code : </p>
  
  <pre><code> public function create_user($value) {
          $this -&gt; CI = get_instance(); // Get the CI instance
          $this -&gt; CI -&gt; load -&gt; library('bcrypt'); // Use this to load the library from within the model 
  
          $hash = $this -&gt; CI -&gt; bcrypt -&gt; password_hash($value[":password"], PASSWORD_BCRYPT, array("cost" =&gt; 17)); Here is where things get shaky.
  
          $value[":password"] = $hash; // Here I take the :password placeholder and update the clear text password with the bcrypt pasword
  
          var_dump($value[":password"]); // This gives me NULL, I assume because I am getting errors with $hash = .......
  
   ........................................
  </code></pre>
  
  <p>as per manual with Password_compat : </p>
  
  <blockquote>
    <p>BCRYPT also allows for you to define a cost parameter in the options
    array. This allows for you to change the CPU cost of the algorithm:</p>
    
    <p>$hash = password_hash($password, PASSWORD_BCRYPT, array("cost" =>
    10));</p>
  </blockquote>
  
  <p>On my front end these are the errors I keep getting : </p>
  
  <blockquote>
    <p>Message: Use of undefined constant PASSWORD_BCRYPT - assumed
    'PASSWORD_BCRYPT'</p>
    
    <p>Message: password_hash() expects parameter 2 to be long, string given</p>
  </blockquote>
  
  <p>I made this into a library itself so I put it into application/librarys folder </p>
  
  <p><strong><a href="http://pastebin.com/8bnBN6CG" rel="nofollow">This is the file</a></strong></p>
  
  <p>any help would be great. Thank you.</p>