Name
zip.SetFileEncryption -- set file encryption
Synopsis
zip.SetFileEncryption(id, idx, method[, pwd$])
Function
This function sets the encryption method for the file at index idx in the zip archive specified by id. The desired encryption method has to be passed in the method parameter. Optionally, you can specify a password in the pwd$ argument. If the pwd$ argument is omitted or set to an empty string, the default password set using zip.SetDefaultPassword() is used.

The method parameter must be one of the following constants:

#ZIP_EM_NONE:
No encryption.

#ZIP_EM_AES_128:
Winzip AES-128 encryption.

#ZIP_EM_AES_192:
Winzip AES-192 encryption.

#ZIP_EM_AES_256:
Winzip AES-256 encryption.

Note that the change to the zip archive isn't done immediately but is postponed until you call zip.CloseArchive().

Inputs
id
identifier of the zip archive to use
idx
index of file whose encryption should be set
method
desired encryption method (see above)
pwd$
optional: desired password for file or empty string to use the default password (defaults to the empty string)

Show TOC