zip_encrypt()

Read(3760) Label: zip, encryption mode,

Description:
Set encryption mode for a zip file.

Syntax:
zip_encrypt(
zip, mode)

Note:

The external library function (See External Library Guide) sets an encryption mode for a zip file with a password. Values of parameter mode is a closed interval [0,4].

Parameter:

zip

A zip file object

mode 

0: Won’t encrypt

1: Standard encryption

2: AES encryption with key length 128

3: AES encryption with key length 192

4: AES encryption with key length 256

Other values:Won’t encrypt

Return value:
Boolean value

Example:

 

A

 

1

=zip_open("D:/e1.zip","123")

Open a zip file.

2

=zip_encrypt(A1,0)

Parameter mode is 0, so the function won’t encrypt the zip file.

3

=zip_encrypt(A1,1)

Parameter mode is 1; it is a standard encryption.

4

>zip_close(A1)

Close a zip file.