crypt = C:\Temp\EMPLOYEE30\EMPLOYEE30.FDB { KeyHolderPlugin = KeyHolder }
isql localhost:C:\Temp\EMPLOYEE30\EMPLOYEE30.FDB -user SYSDBA -pass masterkey SQL>alter database encrypt with dbcrypt key red; SQL> show database; Database: localhost:C:\Temp\EMPLOYEE30\EMPLOYEE30.FDB Owner: ADMINISTRATOR PAGE_SIZE 8192 Number of DB pages allocated = 326 Number of DB pages used = 301 Number of DB pages free = 25 Sweep interval = 20000 Forced Writes are OFF Transaction - oldest = 2881 Transaction - oldest active = 2905 Transaction - oldest snapshot = 2905 Transaction - Next = 2909 ODS = 12.0 Database encrypted Default Character set: NONEAt the point database is encrypted with server-side authentication: the keys are located in the file KeyHolder.conf.
To imitate such environment, we need to remove file with keys KeyHolder.conf from plugins folder of Firebird.
Without KeyHolder.conf plugin will require to receive key from the connected application. Download example of such application from our website – there is a complied version and full sources for it on Delphi XE8.
The code to initialize encrypted connection is very simple – before the usual connection several calls should be run, to send appropriate key. After that the client application works with Firebird as usual.
In the demo application – run it from the folder, connect to the database, run the query, it shows the first row of the specified SELECT.
Please note: the test application can connect to the encrypted database only through TCP/IP, xnet is not supported in demo plugin.