Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Change encryption Password local
Wed, Dec 11 2024 9:18 AMPermanent Link

Teco

TECHNOLOG Systems GmbH

Hi,

I have found an old information that you can change the encryption password only by
1. Decrypting the tables
2. Change the Password
3. Encrypt the tables with a new password.

Has thins changed in the meantime or is this still needed with the version 2.38b2?

Any information about this for the current version?

Thank you.

Best regards
teco
Thu, Dec 12 2024 2:38 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Teco


That's the way I've always done it and I doubt it will have been changed. My process is:

1. copy tables for safety
2. unencrypt
3. encrypt

Roy Lambert
Thu, Jan 16 2025 8:53 AMPermanent Link

Teco

TECHNOLOG Systems GmbH

Dear Roy,

I have tried but it does not worked. The encryption for the config file is keept on the old value and is unaccessible with the new encrpytion password.

I have attached the sample project (Lazarus not RAD Studio).

Do you see what I have forgotten?

Thank you
teco


Roy Lambert wrote:

Teco


That's the way I've always done it and I doubt it will have been changed. My process is:

1. copy tables for safety
2. unencrypt
3. encrypt

Roy Lambert



Attachments: Database_EncryptionTest.zip
Fri, Jan 17 2025 11:50 AMPermanent Link

Walter Matte

Tactical Business Corporation


I think you assigned the wrong password to the session settings.

in ChangeEncryption

Engine Settings has EncryptionPassword2
But the following  SessionSetting uses EncryptionPassword1

Is that the mistake?
Sat, Jan 18 2025 7:38 AMPermanent Link

Teco

TECHNOLOG Systems GmbH

I must check it when I am back in office.
But it looks like a mistake.

I have tried to do it with the EDB Manager
1. Create a session with the encryption password "1"
2. Create some users and tables with encryption.
3. Change catalog and tables to unencrypted.
4. Change the session password to "2", hoping it would change the encryption of the config file.
5. Error 100 - Password is now wrong.

Still the question how to change the encyption of an existing database including config and catalog. Is this possible or does I need to create a new database.

I have currently no actual need to do this, but I am expanding my toolbox with various function, just in case I need it some day, then I have it ready to use.

Walter Matte wrote:


I think you assigned the wrong password to the session settings.

in ChangeEncryption

Engine Settings has EncryptionPassword2
But the following  SessionSetting uses EncryptionPassword1

Is that the mistake?
Sat, Jan 18 2025 8:56 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Teco


I've attached the unit I use to change the encryption - unfortunately it uses some of my homebrew components so it can't be used as is What you'll need to do is.

Change

TnlhEdit -> TEdit
TnlhButton -> TButton

Put the contents of the two TnlnStringBanks into something

 object Stages: TnlhStringBank
   Items.Strings = (
     'Backing up system using current encryption'
     'Creating list of encrypted tables'
     'Extracting data in unencrypted format'
     'Deleting encrypted system'
     'Creating new system with new encryption'
     'Loading data back into TfR'
     'Backing up system using new encryption'
     'Deleting unencrypted data '
     'Encrypting tables that were encrypted'
     ''
     ''
     ''
     '1. Disable the encryption of all tables.'
     '2. Delete the config-file.'
    
       '3. Create a new session (thus a new config-file), but do NOT ope' +
       'n it.'
    
       '4. Edit the edmgr ini-file and change the password(s) to the des' +
       'ired'
     'value(s).'
     '5. Open the session.'
    
       '6. Create a new database and connect it to the folder that conta' +
       'ins your'
     '(unencrypted) tables.'
     '7. Encrypt the tables again.')



 object CreateSQL: TnlhStringBank
   Items.Strings = (
     'SELECT CreateSQL FROM Modules'
     'UNION ALL'
     'SELECT CreateSQL FROM TextFilters'
     'UNION ALL'
     'SELECT CreateSQL FROM WordGenerators'
     'UNION ALL'
     'SELECT CreateSQL FROM Databases'
     'UNION ALL'
    
       'SELECT CreateSQL FROM Roles WHERE Name <> '#39'Administrators'#39' AND N' +
       'ame <> '#39'Public'#39
     'UNION ALL'
    
       'SELECT SUBSTR(CreateSQL,1,POS('#39#39#39'<Password>'#39#39#39',CreateSQL))+Passw' +
       'ord+SUBSTR(CreateSQL,POS('#39'>'#39#39#39',CreateSQL)+1,9999) FROM Users WHE' +
       'RE Name <> '#39'System'#39' AND Name <> '#39'Administrator'#39
     'UNION ALL'
     'SELECT CreateSQL FROM UserRoles'
     'UNION ALL'
     'SELECT CreateSQL FROM Jobs'
     'UNION ALL'
     'SELECT CreateSQL FROM Stores')



Roy Lambert






Attachments: ChangeSystemPIN.dfm ChangeSystemPIN.pas
Mon, Jan 20 2025 5:58 AMPermanent Link

Teco

TECHNOLOG Systems GmbH

Dear Roy,

Thank you. Now it works. Sample with Lazarus is attached. I have used only standard parts, so it should be easy to convert to delphi.


Roy Lambert wrote:

Teco


I've attached the unit I use to change the encryption - unfortunately it uses some of my homebrew components so it can't be used as is What you'll need to do is.

Change

TnlhEdit -> TEdit
TnlhButton -> TButton

Put the contents of the two TnlnStringBanks into something

 object Stages: TnlhStringBank
   Items.Strings = (
     'Backing up system using current encryption'
     'Creating list of encrypted tables'
     'Extracting data in unencrypted format'
     'Deleting encrypted system'
     'Creating new system with new encryption'
     'Loading data back into TfR'
     'Backing up system using new encryption'
     'Deleting unencrypted data '
     'Encrypting tables that were encrypted'
     ''
     ''
     ''
     '1. Disable the encryption of all tables.'
     '2. Delete the config-file.'
    
       '3. Create a new session (thus a new config-file), but do NOT ope' +
       'n it.'
    
       '4. Edit the edmgr ini-file and change the password(s) to the des' +
       'ired'
     'value(s).'
     '5. Open the session.'
    
       '6. Create a new database and connect it to the folder that conta' +
       'ins your'
     '(unencrypted) tables.'
     '7. Encrypt the tables again.')



 object CreateSQL: TnlhStringBank
   Items.Strings = (
     'SELECT CreateSQL FROM Modules'
     'UNION ALL'
     'SELECT CreateSQL FROM TextFilters'
     'UNION ALL'
     'SELECT CreateSQL FROM WordGenerators'
     'UNION ALL'
     'SELECT CreateSQL FROM Databases'
     'UNION ALL'
    
       'SELECT CreateSQL FROM Roles WHERE Name <> '#39'Administrators'#39' AND N' +
       'ame <> '#39'Public'#39
     'UNION ALL'
    
       'SELECT SUBSTR(CreateSQL,1,POS('#39#39#39'<Password>'#39#39#39',CreateSQL))+Passw' +
       'ord+SUBSTR(CreateSQL,POS('#39'>'#39#39#39',CreateSQL)+1,9999) FROM Users WHE' +
       'RE Name <> '#39'System'#39' AND Name <> '#39'Administrator'#39
     'UNION ALL'
     'SELECT CreateSQL FROM UserRoles'
     'UNION ALL'
     'SELECT CreateSQL FROM Jobs'
     'UNION ALL'
     'SELECT CreateSQL FROM Stores')



Roy Lambert



Attachments: Database_EncryptionTest.zip
Image