José Eduardo
José Eduardo

Reputation: 333

compiling cryptdb.dll example from firebird 3.0.3 is not working

I'm trying to build it with Delphi Tokyo, and when I try to encrypt the database I'm getting the message:

- Error loading plugin cryptdb.dll

- Module {FIREBIRDDIR}\plugins\cryptdb.dll does not contain plugin cryptdb.dll type 9

My steps:

  1. Installed Firebird 3.0.3 (NNF)
  2. Rename {FIREBIRDDIR}\examples\dbcrypt\crypdb.pas to cryptdb.dpr, and build
  3. Copied cryptdb.dll to {FIREBIRDDIR}\plugins
  4. isql employee2.fdb -user sysdba -pass masterkey
  5. alter database encrypt with "cryptdb.dll";
  6. no joy, the obnoxious error message appears.

Any ideas what I'm doing wrong?

Upvotes: 1

Views: 599

Answers (3)

Fabiano Kureck
Fabiano Kureck

Reputation: 1

You must change this line do match you dll file. In your case:

pluginManager.registerPluginFactory(IPluginManager.TYPE_DB_CRYPT, 'cryptdb', factory);

Upvotes: 0

FredS
FredS

Reputation: 700

Now that I've verified what's in my Notes still works. Change names as needed

Add to plugins.conf:

Plugin = CRYPTDB {
Module = $(dir_plugins)/cryptDbPlugIn
}

To encrypt the initial db:

firebird>isql localhost:"..\db\UDFEncr.FDB" -user SYSDBA -pass masterkey
SQL> alter database encrypt with cryptDb key nada;

The Firebird.pas file that came with the snapshot back in July did not match the snapshot. I had to compiler generate it from Master.

URL to GitHub for generated Firebird.pas

Upvotes: 0

Mark Rotteveel
Mark Rotteveel

Reputation: 108941

As pointed out by Dimitry on the firebird-support mailing list, the name of the plugin is cryptdb, not cryptdb.dll.

Instead you need to use

alter database encrypt with cryptdb;

Upvotes: 2

Related Questions