I am currently demoing the latest version of IBDAC components which includes the TIBCEncryptor component. I have followed the example in the new help file, and am able to encrypt any new data entered into the fields, but I would like to know how to encrypt all of the pre-existing data.
For example...
Say I started with the following:
CREATE TABLE CLIENTS (
CLIENT_ID INTEGER NOT NULL PRIMARY KEY,
CLIENT_NAME VARCHAR(200),
PHONE_1 VARCHAR(12),
PHONE_2 VARCHAR(12)
)
There are many records with phone numbers already existing.
Now, before setting up the new encryption, I am running the following...
ALTER TABLE CLIENTS ALTER COLUMN PHONE_1 TYPE VARCHAR(200) CHARACTER SET OCTETS;
ALTER TABLE CLIENTS ALTER COLUMN PHONE_2 TYPE VARCHAR(200) CHARACTER SET OCTETS;
Next, I point the query to the IBCEncryptor and set the proper options to encrypt PHONE_1 & PHONE_2.
If I change or alter one of the phone #'s and post the record, the data becomes encrypted as expected, but the other field that was not changed remains unencrypted.
Is there a way for me to call a procedure or update all existing data in the fields which I want to be encrypted? I tried using an sql query to set the data equal to itself, ex. SET PHONE_1 = PHONE_1, but that did not encrypt the data. These are large tables and I would like to make sure all of the existing data is encrypted before new rows are added.
Any suggestions/examples would be greatly appreciated.
[Edit] Also, when using the tag & hash method, is there a way to tell if the field data is encrypted? A function or something? Thanks.
Encrypting field data in a pre-existing table
-
- Posts: 12
- Joined: Thu 04 Dec 2008 23:08
Re: Encrypting field data in a pre-existing table
For the time being, there is no possibility to encrypt a table otherwise than editing and posting its records. We will add the possibility to encrypt a whole table and the possibility to determine if data in a field is encrypted to one of the next builds of all DAC products.
Re: Encrypting field data in a pre-existing table
Hello,
this function was implamented ? Is it possible now to encrypting a pre existing table?
thanks
Alex
this function was implamented ? Is it possible now to encrypting a pre existing table?
thanks
Alex
Re: Encrypting field data in a pre-existing table
We have added a capability for encryption of tables and datasets and a capability to detect whether data of a particular field is encrypted in IBDAC 5.0.1.
You can encrypt an existing table using the TIBCConnection.EncryptTable or TCustomIBCDataSet.Encryption.EncryptDataSet methods.
The TCustomIBCDataSet.Encryption.IsFieldEncrypted method allows to detect whether data in a particular field is encrypted.
You can encrypt an existing table using the TIBCConnection.EncryptTable or TCustomIBCDataSet.Encryption.EncryptDataSet methods.
The TCustomIBCDataSet.Encryption.IsFieldEncrypted method allows to detect whether data in a particular field is encrypted.
Re: Encrypting field data in a pre-existing table
Hello,
Could you give me the example how to use the :
IBCConnection1.EncryptTable('CADPAL', ?????????, 'PALAVRA_EST');
I didn't find any help on this functionaly
Thanks
Could you give me the example how to use the :
IBCConnection1.EncryptTable('CADPAL', ?????????, 'PALAVRA_EST');
I didn't find any help on this functionaly
Thanks
Re: Encrypting field data in a pre-existing table
Thank you for being interested in our products.
The TIBCConnection.EncryptTable(const TableName: string; Encryptor: TIBCEncryptor; const Fields: string) method encrypts a previously created table.
Parameters:
TableName - the name of the encrypted table;
Encryptor - the TIBCEncryptor component that will be used to encrypt the table;
Fields - the list of fields to be encrypted.
See more details about data encryption in the IBDAC documentation: http://www.devart.com/ibdac/docs/encryption.htm
The TIBCConnection.EncryptTable(const TableName: string; Encryptor: TIBCEncryptor; const Fields: string) method encrypts a previously created table.
Parameters:
TableName - the name of the encrypted table;
Encryptor - the TIBCEncryptor component that will be used to encrypt the table;
Fields - the list of fields to be encrypted.
See more details about data encryption in the IBDAC documentation: http://www.devart.com/ibdac/docs/encryption.htm