Forum > General

How to set a password for the archive? paszlib TZipper

(1/1)

viterik:
Please tell me. How to set a password for the archive? I use this library
https://fpcwiki.coderetro.net/paszlib/


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Uses ...Zipper,FileUtilvar  AZipper: TZipper;  TheFileList:TStringList;begin  MyDirectory:='C:\MyFolder';  AZipper := TZipper.Create;  AZipper.Filename := 'myzipfile.zip';  TheFileList:=TStringList.Create;  try    FindAllFiles(TheFileList, MyDirectory);    AZipper.Entries.AddFileEntries(TheFileList);    AZipper.ZipAllFiles;  finally    TheFileList.Free;    AZipper.Free;  end;end;

Nicole:
Are you sure, you just want to set a password?

Encryption of the content would be better.
Encryption is not an easy task and there are many ways to do it.
Perhaps you may want to key in the keyword to find out, what way fits for you.

paweld:
TZipper don't support password. Try Abbrevia component: https://forum.lazarus.freepascal.org/index.php/topic,15462.msg83043.html#msg83043

Navigation

[0] Message Index

Go to full version