title: Storing encrypted data in database using Security::Cipher
body: <p>I am using following code to encrypt some string:</p>
  
  <pre><code>$value = 'somevalue';
  $key = Configure::read('Security.salt');
  
  $encrypted = Security::cipher($value,$key);
  $decrypted = Security::cipher($encrypted,$key);
  </code></pre>
  
  <p>It works fine, it encrypts/decrypts correctly. 
  But I can't save encrypted value in database - I set value of field encrypted_data to <code>$encrypted</code> and after <code>save()</code> there is nothing in this field in database. When I change $encrypted to for example 'string' it saves 'string' correctly to <code>'encrypted_data'</code>.</p>
  
  <p>So the problem might be that encrypted string contains some strange characters that database wont accept - how I can fix it? (Using mysql database with utf-8)</p>