I had my App already working with regular sqlite. I followed the instructions to add sqlcipher to my project and everything compiled right. But I'm having a warning:Implicit declaracion of function 'sqlite3_key'
I guess it's because the project is still using regular sqlite instead of sqlitecipher. I removed the libsqlite from the frameworks but it still gives the same warning and it fails on executing the test: "incorrect password"
Also, SQLITE_HAS_CODEC should be defined, otherwise the sqlite3.h header will not declare sqlite3_key, etc.
Also, SQLITE_HAS_CODEC should be defined, otherwise the sqlite3.h header will not declare sqlite3_key, etc.
sqlite3_exec(baseLexicaleGeneraleFR, "PRAGMA key = 'BIGsecret'", NULL, NULL, NULL);
const char* key = [@"BIGSecret" UTF8String];
sqlite3_key(baseLexicaleGeneraleFR, key, strlen(key));
I've no experience with XCode, but "implicit declaration" sounds to me like
the function is defined but no declared.
An excerpt from sqlite3.h (note the #ifdef on the first line):
#ifdef SQLITE_HAS_CODEC
/*
** Specify the key for an encrypted database. This routine should be
** called right after sqlite3_open().
**
** The code to implement this API is not available in the public release
** of SQLite.
*/
SQLITE_API int sqlite3_key(
sqlite3 *db, /* Database to be rekeyed */
const void *pKey, int nKey /* The key */
);
-----Original Message-----
From: sqlc...@googlegroups.com [mailto:sqlc...@googlegroups.com] On
I'll give it a try on Monday and I'll post the results in the group
El 14/05/2011, a las 11:52, Cocoa71 <edd...@gmail.com> escribió:
> Hello Jorge,
>
> the setting is in your project build options, in "Other C Flags". See the image with this post.
>
> Eddy
>
> [IMG]http://img713.imageshack.us/img713/9818/sqlciphersqlitehascodec.png[/IMG]
>
Hi Guys,We're in the process of moving the sqlcipher site to a new host. I'll make a note to update the tutorial as soon as that's complete.Cheers,Stephen
Error: 11 "database disk image is malformed"
You can’t use sqlite3_rekey to encrypt an existing plain database. Generally, sqlite3_rekey can only be used to change the key or certain encryption parameters on an already encrypted database.
Search the mailing list archive for discussions on this topic and steps needed for encrypting an existing plain database or decrypting an existing encrypted database. The new beta version of SqlCipher makes this possible following a specific set of steps (I think this works, can’t remember 100%).
From: sqlc...@googlegroups.com [mailto:sqlc...@googlegroups.com] On Behalf Of Jorge Ferrando
Sent: Monday, May 16, 2011 10:19 AM
To: sqlc...@googlegroups.com
Certainly it's really confusing cause this is what documentation shows:"Now that the SQLCipher library is incorporated into the project you can start using the system immediately. Telling SQLCipher to encrypt a database is as easy as opening a database and using the sqlite3_key function, or PRAGMA key"."