I need a fast and strong compression + encryption method for my DAT file.
I’ve a DAT file which contains very sensitive information and I would like to compress and encrypt it. I know I can use Zlib in compression method but how about the encryption method too ?
many thanks
If you need both encryption and compression at the same time, you have two ways of implementing it:
In all cases, the best is to compress before encryption. It is more difficult to uncypher data from a compressed format, since its content is less expectable.
Then rely on a strong enough encryption algorithm (like AES).
You have all those features in our Open Source units (from Delphi 5 up to XE2). You can use ZIP, or try our much faster (but less efficient in term of compression ration) SynLZ. Then SynCrypto can be used to encrypt it. There are direct functions handling
RawByteStringkind of data, which contents the data in a memory buffer.