title: Two-way encryption with comparable result
body: <p>I encrypt a text using Laravel <code>Crypt::encrypt("text")</code> but everytime I get different results. I want the encrypted result to be compared in database.</p>
  
  <pre><code>$sql = 'SELECT * FROM users WHERE `encrypted_field` = "'.Crypt::encrypt('text').'"';
  </code></pre>
  
  <p>But because <code>Crypt::encrypt('text')</code> return different result every time, the query returns nothing.</p>
  
  <p>How to deal with this problem?</p>