title: Rails: storing encrypted data in database
body: <p>I want to encrypt database because confidential data is being stored. I use mongodb with mongoid. It possible for this kind of database? And what alternatives can you recomend, if it is not?</p>
  
  <p>P.S. Main purpose is: if anybody hack the server and steal DB, it would be unencryptable.</p>
  
  <p>UPDATE: thanks for <a href="https://stackoverflow.com/users/34478/nickh">nickh</a>, I found very many <a href="https://www.ruby-toolbox.com/categories/encryption" rel="nofollow noreferrer">soultions for ActiveRecord</a>, but nothing for Mongoid and other Mongo clinets. It would be great to find some soultion for Mongo and Mongoid!</p>