Manpages - zip_file_set_encryption.3

libzip (-lzip)

The

function sets the encryption method for the file at position

in the zip archive to

using the password

The

is the same as returned by

For the

argument, currently only the following values are supported:

No encryption.

Winzip AES-128 encryption.

Winzip AES-192 encryption.

Winzip AES-256 encryption.

Traditional PKWare encryption. Do not use this method, it is not secure. It is only provided for backwards compatibility.

If

is

the default password provided by

is used.

The current encryption method for a file in a zip archive can be determined using

Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in

is set to indicate the error.

fails if:

Unsupported compression method requested.

is not a valid file index in

or the argument combination is invalid.

Required memory could not be allocated.

Read-only zip file, no changes allowed.

was added in libzip 1.2.0.

and

Author: dt

Created: 2022-02-21 Mon 13:06