<< ibec_CreateConnection | IBEBlock | ibec_UseConnection >>


The ibec_RegisterFBCryptKey was implemented in IBExpert version 2016.08.20.


    function ibec_RegisterFBCryptKey(KeyName : string; KeyData : string; FBCryptDLLPath : string) : integer;

The ibec_RegisterFBCryptKey function registers a key to allow work with an encrypted Firebird database (Firebird 3).


KeyNameThe key name should match the one used in the ALTER DATABASE ENCRYPT WITH "DbCrypt" KEY NAME operator.
KeyDataKey bytes sequence.
FBCryptDLLPathCurrently not used, reserved for future use.

There are three ways to specify the key bytes sequence:

  1. ibec_RegisterFBCryptKey('Red', '$ec$a1$52$f6$4d$27$da$93...', '')
  2. ibec_RegisterFBCryptKey('Green', '0xab,0xd7,0x34,0x63,0xae,0x19,...', '');
  3. ibec_RegisterFBCryptKey('Raw', 'just a plain string', '');

It is possible to register more than one key (they should have different names).

The ibec_RegisterFBCryptKey function registers a key within the IBExpert/IBEScript process. Specified keys will be registered on the server if the key not set error appears when connecting to a database.

ibec_RegisterFBCryptKey requires FBCrypt.dll on the client side. DBCrypt.dll and KeyHolder.dll (plugins) should be installed and configured on the server side.

There are several ways to call ibec_RegisterDBCryptKey before connecting to a database:

  1. Include it into the After IBExpert Starts script (Options / Environment Options).
  2. Include it into the Before Connect Script of a database (Database Registration Info).
  3. Include it into the After IBExpert Starts event block (DB Explorer / Blocks / Create/Edit event block in the context menu).