Lloyd <[EMAIL PROTECTED]> wrote:
> Hi List,
>  Whether the data base which we create through the program will be in
> encrypted form? 

The public-domain version of SQLite does not encrypt the data.
But commerical extensions that encrypt the data are available.
See, for example, http://www.hwaci.com/sw/sqlite/prosupport.html#crypto

> 
> If yes, how can I see the result in sqlite? (How can use select
> statements on this database?)
> 
> My application creates a database and to analyze the results in the
> database, it will be easy for me to use the interface provided by the
> sqlite. How can I open the database in SQLite ?
> 

When a database is encrypted you must supply the encryption key
before reading or modifying the database.  You can do this in
several ways.  There is a pragma:

   PRAGMA key=?

If the database is being loaded using an ATTACH statement then
you specify the key in the USING clause of the ATTACH:

   ATTACH DATABASE 'encrypted.db' AS e2 USING :key

Or you can use the C/C++ API:

   sqlite3_key(db, zKey);

Once the key is established, the database content is automatically
decrypted as it is read from the disk and reencrypted as it is
written back to the disk.

If you use the command-line client, there is a special option
to specify the key:

   sqlite3 -key 'hello' database.db
           ^^^^^^^^^^^^

After that the command-line client works just like it normally
does.

None of the above works in the public domain version of SQLite.
You have to purchase a license for a version of SQLite that 
supports encryption in order to use these features.

--
D. Richard Hipp  <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to