I have a plain text db I'm using with my android app. This db is clearly not encrypted, and it is functionnal ( as I am using it often with my android app, and as I'm able to open it with sqlite browser for example)
However, trying to open it using sqlcipher doesn't work.
I'm trying this code:
sqlite> ATTACH DATABASE 'encrypted.db' AS encrypted KEY 'testkey';
sqlite> SELECT sqlcipher_export('encrypted');
sqlite> DETACH DATABASE encrypted;
But I automatically get the Error: file is encrypted or is not a database error message... It seems that the KEY parameter is guilty as it works without. But I need it to encrypt my DB. any idea?
I'm using sqlcipher 2.2.1-2ubuntu2. Opening my db with a text editor works, and as it begin with SQLite format 3 and contains visible datas, I'm sure it's not already encrypted. Thanks.
Aucun commentaire:
Enregistrer un commentaire