1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Fix the handling of -init option to the sqlite shell. Ticket #568.

Also add hooks for encrypting the database. (CVS 1206)

FossilOrigin-Name: 3c796de8d1af55944f396f08feaa9e69c1652896
This commit is contained in:
drh
2004-02-01 01:22:50 +00:00
parent 3914aed1de
commit 22fbcb8ddd
6 changed files with 226 additions and 130 deletions

View File

@@ -12,7 +12,7 @@
** This header file defines the interface that the SQLite library
** presents to client programs.
**
** @(#) $Id: sqlite.h.in,v 1.54 2004/01/15 02:44:03 drh Exp $
** @(#) $Id: sqlite.h.in,v 1.55 2004/02/01 01:22:52 drh Exp $
*/
#ifndef _SQLITE_H_
#define _SQLITE_H_
@@ -773,6 +773,33 @@ void sqlite_progress_handler(sqlite*, int, int(*)(void*), void*);
*/
void *sqlite_commit_hook(sqlite*, int(*)(void*), void*);
/*
** Open an encrypted SQLite database. If pKey==0 or nKey==0, this routine
** is the same as sqlite_open().
**
** The code to implement this API is not available in the public release
** of SQLite.
*/
sqlite *sqlite_open_encrypted(
const char *zFilename, /* Name of the encrypted database */
const void *pKey, /* Pointer to the key */
int nKey, /* Number of bytes in the key */
char **pzErrmsg /* Write error message here */
);
/*
** Change the key on an open database. If the current database is not
** encrypted, this routine will encrypt it. If pNew==0 or nNew==0, the
** database is decrypted.
**
** The code to implement this API is not available in the public release
** of SQLite.
*/
int sqlite_rekey(
sqlite *db, /* Database to be rekeyed */
const void *pKey, int nKey /* The new key */
);
#ifdef __cplusplus
} /* End of the 'extern "C"' block */
#endif