Thank you for your reply. The encryption itself is OK, I had already got it. My question only concerns checking for encryption. I had seen the approach with the first 16 bytes in an external source and I wasn't very happy with it, therefore my question here. String comparisons are in most cases a hack, for example, the format will probably change to 4 when they release SQLite 4 and then the check won't work. But I guess that since there seems to be no better way, I'll have to make my peace with it.