CodeIgniter Encryption Library
<p>I'm building a quick site with CodeIgniter and currently I'm making use of the CI 'encrypt' library. Reading through <a href="https://ellislab.com/codeigniter/user-guide/libraries/encryption.html" rel="nofollow">here</a> it sounds like I just throw on a quick:</p>

<pre><code>$this-&gt;encrypt-&gt;encode($secret_data);
</code></pre>

<p>and do this when you want to use it:</p>

<pre><code>$this-&gt;encrypt-&gt;decode($encripted_string);
</code></pre>

<p>Then the magic of CI and Mcrypt do the rest. </p>

<p>Well I'm not sure I can sleep without knowing what is going on in the background. So I have two questions... </p>

<ol>
<li><p>How is this working? Or is there a good resource to explain to me how this is working that I can read up on it?</p></li>
<li><p>Is this generally thought of as a safe way to encrypt data? If not where else should I be looking.</p></li>
</ol>