I am currently in the process of converting a project (that uses encryption) from Delphi 6 to XE. This project uses the old Delphi Encryption Compendium which does not work in XE. So I figured that I would swap from that component set to LockBox. There are two versions of LockBox - 2 and 3. I have no problems with using the LockBox2 in Delphi 6. I though that I would use LockBox3 in XE, but the problem that I have is that I cannot get the same results when used with ExFile demo program (from LockBox2).
In that demo I select the Blowfish algorithm set the password to 'testkey' without the quotes and the program will encrypt the file.
In Delphi XE, I dropped onto the form
Codec1: TCodec;
CryptographicLibrary1: TCryptographicLibrary;
and linked Codec1 to CryptographicLibrary1 and when clicking a button the following code is executed (found similar code on LockBox3 site for decrypting strings)....
codec1.StreamCipherId := BlockCipher_ProgId;
codec1.BlockCipherId := Blowfish_ProgId;
codec1.ChainModeId := ECB_ProgId;
codec1.Password := 'testkey';
codec1.encryptFile('d:\tools\mingw\bin\md5.exe',
'd:\tools\mingw\bin\md5_xe_2.exe');
But the end result is that the output file has a different size to that from the LockBox2 ExFile demo.
So my questions are....
What have I done wrong in the XE code above such that I gives a different result to ExFile demo from LockBox2?
Should I just use LockBox2 within XE?
Related to 2, is there someone looking after the code LockBox2 (for XE)?
Any assistance would be greatly appreciated.
Regards,