But I need to read this field and compare with a string.
How to convert encrypt value to normal value in my application.
Daniel Fagnan
Code: Select all
var
con: TIBCConnection;
q: TIBCQuery;
encr: TIBCEncryptor;
begin
con := TIBCConnection.Create(nil);
q := TIBCQuery.Create(nil);
encr := TIBCEncryptor.Create(nil);
try
... // setting connection parameters
q.Connection := con;
q.Encryption.Encryptor := encr; // encr must have the correct options
q.Encryption.Fields := 'field names'; // setting field names for which data will be decrypted
q.Encryption.Encryptor.Password := 'password'; // the password that was used for data encryption
q.SQL.Text := 'select * from tablename';
q.Open; // here IBDAC decrypts data
finally
q.Free;
encr.Free;
con.Free;
end;
end;