I have a Delphi project in which a zip file which is password protected is created on some user action. In order to do this we have used a third party component abbrevia. But I now want to do this through Delphi native component using system.zip unit.
procedure CreateZip( zipfilename : string);
var
Zipper : TZipFile;
begin
Zipper := TZipFile.Create;
Zipper.Open( zipfilename + '.zip',zmWrite);
Zipper.Add('filename1.txt','',zcDeflate);
Zipper.Add('filename2.txt','',zcDeflate);
Zipper.Add('filename3.txt','',zcDeflate);
Zipper.Free;
end;
This creates a zip file with the name passed as a parameter to the procedure. But I want the generated zip to be password protected. Any help would be appreciated.