ZIP_FOPEN_ENCRYPTED

Section: C Library Functions (3)
Index Return to Main Contents

BSD mandoc
 

NAME

zip_fopen_encrypted zip_fopen_index_encrypted - open encrypted file in zip archive for reading  

LIBRARY

libzip (-lzip)  

SYNOPSIS

In zip.h Ft zip_file_t * Fn zip_fopen_encrypted zip_t *archive const char *fname zip_flags_t flags const char *password Ft zip_file_t * Fn zip_fopen_index_encrypted zip_t *archive zip_uint64_t index zip_flags_t flags const char *password  

DESCRIPTION

The Fn 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_fopen3.

The Fn zip_fopen_index_encrypted function opens the file at position index see zip_fopen_index3. These functions are called automatically by zip_fopen3; you only need to call them if you want to specify a non-default password (see zip_set_default_password3).  

RETURN VALUES

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

ERRORS

Bq Er ZIP_ER_NOPASSWD
No password was provided.

The function Fn zip_fopen_encrypted may also fail and set zip_err for any of the errors specified for the routine zip_fopen3.

The function Fn zip_fopen_index_encrypted may also fail and set zip_err for any of the errors specified for the routine zip_fopen_index3.  

SEE ALSO

libzip(3), zip_fclose3, zip_fopen3, zip_fread3, zip_get_num_entries3, zip_name_locate3  

HISTORY

Fn zip_fopen_encrypted and Fn zip_fopen_index_encrypted were added in libzip 1.0.  

AUTHORS

An -nosplit An Dieter Baron Aq Mt dillo@nih.at and An Thomas Klausner Aq Mt tk@giga.or.at


 

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
RETURN VALUES
ERRORS
SEE ALSO
HISTORY
AUTHORS

This document was created by man2html, using the manual pages.
Time: 04:46:11 GMT, May 22, 2024