title: Embedded Database and Encryption
body: <p>I want to create an open-source application where the user-specific data is stored in an embedded database (e.g. SQLite, H2, HSQLDB). Additionally there would be a Login-Screen where the user has to enter the password of the encrypted database. But I'm not sure yet how to handle the encryption: Only handled by the database and/or by e.g. BouncyCastle with a whole file encryption?</p>
  
  <p>I would prefer file-based encryption: If I would use file encryption would it be possible to work with an embedded database without storing the decrypted file physically on the hard disk? Does this request even make sense? I mean if my computer was compromised by an attacker the data stored in the database is somehow or other readable, right? On the other side it would be nice if there isn't the need to create a decrypted copy of the database (think about the space on the hard disk or performance).</p>
  
  <p>Many thanks in advance for your help! :)</p>