1ZIP_FOPEN_ENCRYPTED(3)   BSD Library Functions Manual   ZIP_FOPEN_ENCRYPTED(3)
2

NAME

4     zip_fopen_encrypted, zip_fopen_index_encrypted — open encrypted file in
5     zip archive for reading
6

LIBRARY

8     libzip (-lzip)
9

SYNOPSIS

11     #include <zip.h>
12
13     zip_file_t *
14     zip_fopen_encrypted(zip_t *archive, const char *fname, zip_flags_t flags,
15         const char *password);
16
17     zip_file_t *
18     zip_fopen_index_encrypted(zip_t *archive, zip_uint64_t index,
19         zip_flags_t flags, const char *password);
20

DESCRIPTION

22     The zip_fopen_encrypted() function opens the encrypted file name fname in
23     archive using the password given in the password argument.  The flags
24     argument are the same as for zip_fopen(3).
25
26     The zip_fopen_index_encrypted() function opens the file at position
27     index, see zip_fopen_index(3).  These functions are called automatically
28     by zip_fopen(3); you only need to call them if you want to specify a non-
29     default password (see zip_set_default_password(3)).
30

RETURN VALUES

32     Upon successful completion, a struct zip_file pointer is returned.  Oth‐
33     erwise, NULL is returned and the error code in archive is set to indicate
34     the error.
35

ERRORS

37     [ZIP_ER_NOPASSWD]     No password was provided.
38
39     The function zip_fopen_encrypted() may also fail and set zip_err for any
40     of the errors specified for the routine zip_fopen(3).
41
42     The function zip_fopen_index_encrypted() may also fail and set zip_err
43     for any of the errors specified for the routine zip_fopen_index(3).
44

SEE ALSO

46     libzip(3), zip_fclose(3), zip_fopen(3), zip_fread(3),
47     zip_get_num_entries(3), zip_name_locate(3)
48

HISTORY

50     zip_fopen_encrypted() and zip_fopen_index_encrypted() were added in
51     libzip 1.0.
52

AUTHORS

54     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
55
56BSD                            December 18, 2017                           BSD
Impressum