FirebirdSQL / NETProvider

Firebird ADO.NET Data Provider
https://www.firebirdsql.org/en/net-provider/
Other
152 stars 63 forks source link

Make it possible to install callback function handler to pass DB encryption key to server. #1091

Open AlexPeshkoff opened 1 year ago

AlexPeshkoff commented 1 year ago

Currently the only way to pass dbcrypt key when attaching to database is provide it in connection string. Please provide 2 ways to use callback function that sends a key to the server in .net client:

  1. Let application install callback handler to process key requests from server in the application.
  2. If some library with fixed name (something like KeyCallback.dll, but certainly it's just an example) is available for dynamic load and some entrypoint (also KeyCallback for example) exists in it, that entrypoint is installed as such callback handler automatically.

Callback function should have 5 parameters: unsigned callback(void context, unsigned dataLength, const BYTES data, unsigned bufferLength, BYTES* buffer); where