"Fossies" - the Fresh Open Source Software Archive

Member "libzip-1.5.2/man/zip_fopen_encrypted.html" (12 Mar 2019, 6931 Bytes) of package /linux/misc/libzip-1.5.2.tar.xz:

Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the libzip-1.5.2.tar.xz project site itself.


zip_fopen_encrypted, zip_fopen_index_encrypted
open encrypted file in zip archive for reading

libzip (-lzip)

#include <zip.h>

zip_file_t *
zip_fopen_encrypted(zip_t *archive, const char *fname, zip_flags_t flags, const char *password);

zip_file_t *
zip_fopen_index_encrypted(zip_t *archive, zip_uint64_t index, zip_flags_t flags, const char *password);

The zip_fopen_encrypted() function opens the encrypted file name fname in archive using the password given in the password argument. The flags argument are the same as for zip_fopen(3).

The zip_fopen_index_encrypted() function opens the file at position index, see zip_fopen_index(3). These functions are called automatically by zip_fopen(3); you only need to call them if you want to specify a non-default password (see zip_set_default_password(3)).

Upon successful completion, a struct zip_file pointer is returned. Otherwise, NULL is returned and the error code in archive is set to indicate the error.

No password was provided.

The function zip_fopen_encrypted() may also fail and set zip_err for any of the errors specified for the routine zip_fopen(3).

The function zip_fopen_index_encrypted() may also fail and set zip_err for any of the errors specified for the routine zip_fopen_index(3).

libzip(3), zip_fclose(3), zip_fopen(3), zip_fread(3), zip_get_num_entries(3), zip_name_locate(3)

zip_fopen_encrypted() and zip_fopen_index_encrypted() were added in libzip 1.0.

Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
December 18, 2017 NetBSD 8.99.35