1ZIP_SET_DEFAULT_PASSWORD(3)Library Functions ManualZIP_SET_DEFAULT_PASSWORD(3)
2
3
4

NAME

6       zip_set_default_password  - set default password for encrypted files in
7       zip
8

LIBRARY

10       libzip (-lzip)
11

SYNOPSIS

13       #include <zip.h>
14
15       int zip_set_default_password(struct zip  *archive,  const  char  *pass‐
16       word);
17

DESCRIPTION

19       The  zip_set_default_password  function  sets the default password used
20       when accessing encrypted files.  If password is NULL, the default pass‐
21       word is unset.
22
23       If   you   prefer   a   different   password   for  single  files,  use
24       zip_fopen_encrypted(3) instead of zip_fopen(3).  Usually, however,  the
25       same password is used for every file in an zip archive.
26

RETURN VALUES

28       Upon  successful  completion  0 is returned.  Otherwise, -1 is returned
29       and the error information in archive is set to indicate the error.
30

ERRORS

32       zip_set_default_password fails if:
33
34              [ZIP_ER_MEMORY]
35                  Required memory could not be allocated.
36

SEE ALSO

38       libzip(3), zip_fopen(3), zip_fopen_encrypted(3)
39

AUTHORS

41       Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
42
43
44
45NiH                             January 3, 2011    ZIP_SET_DEFAULT_PASSWORD(3)
Impressum