Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | zip_compression_algorithm |
struct | _zip_err_info |
struct | zip |
struct | zip_file |
struct | zip_dirent |
struct | zip_cdir |
struct | zip_extra_field |
struct | zip_source |
struct | zip_entry |
struct | zip_string |
struct | zip_buffer |
struct | zip_filelist |
struct | _zip_pkware_keys |
Typedefs | |
typedef zip_source_t *(* | zip_encryption_implementation) (zip_t *, zip_source_t *, zip_uint16_t, int, const char *) |
typedef enum zip_compression_status | zip_compression_status_t |
typedef struct zip_compression_algorithm | zip_compression_algorithm_t |
typedef zip_int64_t(* | zip_source_layered_callback) (zip_source_t *, void *, void *, zip_uint64_t, enum zip_source_cmd) |
typedef enum zip_encoding_type | zip_encoding_type_t |
typedef struct zip_cdir | zip_cdir_t |
typedef struct zip_dirent | zip_dirent_t |
typedef struct zip_entry | zip_entry_t |
typedef struct zip_extra_field | zip_extra_field_t |
typedef struct zip_string | zip_string_t |
typedef struct zip_buffer | zip_buffer_t |
typedef struct zip_hash | zip_hash_t |
typedef struct zip_progress | zip_progress_t |
typedef enum zip_source_write_state | zip_source_write_state_t |
typedef struct zip_filelist | zip_filelist_t |
typedef struct _zip_winzip_aes | zip_winzip_aes_t |
typedef struct _zip_pkware_keys | zip_pkware_keys_t |
#define ADD_INDEX_TO_DETAIL | ( | error, | |
index | |||
) | MAKE_DETAIL_WITH_INDEX(GET_ERROR_FROM_DETAIL(error), (index)) |
#define CDBUFSIZE (MAXCOMLEN + EOCDLEN + EOCD64LOCLEN) |
#define DEFINE_BYTE_ARRAY | ( | buf, | |
size | |||
) | zip_uint8_t buf[size] |
#define GET_INDEX_FROM_DETAIL | ( | error | ) | (((error) >> 8) & MAX_DETAIL_INDEX) |
#define MAKE_DETAIL_WITH_INDEX | ( | error, | |
index | |||
) | ((((index) > MAX_DETAIL_INDEX) ? MAX_DETAIL_INDEX : (int)(index)) << 8 | (error)) |
#define SALT_LENGTH | ( | method | ) | ((method) == ZIP_EM_AES_128 ? 8 : ((method) == ZIP_EM_AES_192 ? 12 : 16)) |
#define WINZIP_AES_MAX_HEADER_LENGTH (16 + WINZIP_AES_PASSWORD_VERIFY_LENGTH) |
#define ZIP_CM_ACTUAL | ( | x | ) | ((zip_uint16_t)(ZIP_CM_IS_DEFAULT(x) ? ZIP_CM_DEFLATE : (x))) |
#define ZIP_CM_IS_DEFAULT | ( | x | ) | ((x) == ZIP_CM_DEFAULT || (x) == ZIP_CM_REPLACED_DEFAULT) |
#define ZIP_CODEC_DECODE 0 /* decompress/decrypt (encode flag not set) */ |
#define ZIP_DIRENT_ALL ZIP_UINT32_MAX |
#define ZIP_EF_BOTH (ZIP_EF_LOCAL | ZIP_EF_CENTRAL) /* include in both */ |
#define ZIP_EF_CENTRAL ZIP_FL_CENTRAL /* include in central directory */ |
#define ZIP_EF_IS_INTERNAL | ( | id | ) | ((id) == ZIP_EF_UTF_8_COMMENT || (id) == ZIP_EF_UTF_8_NAME || (id) == ZIP_EF_WINZIP_AES || (id) == ZIP_EF_ZIP64) |
#define ZIP_EF_LOCAL ZIP_FL_LOCAL /* include in local header */ |
#define ZIP_ENTRY_HAS_CHANGES | ( | e | ) | (ZIP_ENTRY_DATA_CHANGED(e) || (e)->deleted || ZIP_ENTRY_CHANGED((e), ZIP_DIRENT_ALL)) |
#define ZIP_ER_DETAIL_CDIR_OVERLAPS_EOCD 1 /* G central directory overlaps EOCD, or there is space between them */ |
#define ZIP_ER_DETAIL_EOCD64_OVERLAPS_EOCD 8 /* G EOCD64 overlaps EOCD, or there is space between them */ |
#define ZIP_ER_DETAIL_EOCD64_WRONG_MAGIC 9 /* G EOCD64 magic incorrect */ |
#define ZIP_ER_DETAIL_INVALID_ZIP64_EF 14 /* E invalid Zip64 extra field */ |
#define ZIP_FILE_ATTRIBUTES_GENERAL_PURPOSE_BIT_FLAGS_ALLOWED_MASK 0x0836 |
#define ZIP_FL_ENCODING_ALL (ZIP_FL_ENC_GUESS | ZIP_FL_ENC_CP437 | ZIP_FL_ENC_UTF_8) |
#define ZIP_FL_FORCE_ZIP64 1024 /* force zip64 extra field (_zip_dirent_write) */ |
#define ZIP_GPBF_STRONG_ENCRYPTION 0x0040u /* uses strong encryption */ |
#define ZIP_IS_RDONLY | ( | za | ) | ((za)->ch_flags & ZIP_AFL_RDONLY) |
#define ZIP_SOURCE_IS_OPEN_WRITING | ( | src | ) | ((src)->write_state == ZIP_SOURCE_WRITE_OPEN) |
typedef struct zip_buffer zip_buffer_t |
typedef struct zip_cdir zip_cdir_t |
typedef struct zip_compression_algorithm zip_compression_algorithm_t |
typedef enum zip_compression_status zip_compression_status_t |
typedef struct zip_dirent zip_dirent_t |
typedef enum zip_encoding_type zip_encoding_type_t |
typedef zip_source_t*(* zip_encryption_implementation) (zip_t *, zip_source_t *, zip_uint16_t, int, const char *) |
typedef struct zip_entry zip_entry_t |
typedef struct zip_extra_field zip_extra_field_t |
typedef struct zip_filelist zip_filelist_t |
typedef struct zip_hash zip_hash_t |
typedef struct _zip_pkware_keys zip_pkware_keys_t |
typedef struct zip_progress zip_progress_t |
typedef zip_int64_t(* zip_source_layered_callback) (zip_source_t *, void *, void *, zip_uint64_t, enum zip_source_cmd) |
typedef enum zip_source_write_state zip_source_write_state_t |
typedef struct zip_string zip_string_t |
typedef struct _zip_winzip_aes zip_winzip_aes_t |
enum zip_encoding_type |
enum zip_les |
zip_int64_t _zip_add_entry | ( | zip_t * | za | ) |
Definition at line 43 of file zip_add_entry.c.
References _zip_entry_init(), zip::entry, zip::error, setup::idx, zip::nentry, zip::nentry_alloc, realloc(), za, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_file_replace().
zip_uint8_t* _zip_buffer_data | ( | zip_buffer_t * | buffer | ) |
Definition at line 40 of file zip_buffer.c.
Referenced by _zip_cdir_write(), _zip_ef_utf8(), _zip_find_central_dir(), _zip_read_cdir(), encrypt_header(), and write_data_descriptor().
bool _zip_buffer_eof | ( | zip_buffer_t * | buffer | ) |
Definition at line 60 of file zip_buffer.c.
References buffer::offset, and buffer::size.
Referenced by _zip_dirent_read(), _zip_dirent_size(), _zip_ef_parse(), _zip_read_cdir(), _zip_read_local_ef(), pkware_encrypt(), and winzip_aes_encrypt().
void _zip_buffer_free | ( | zip_buffer_t * | buffer | ) |
Definition at line 46 of file zip_buffer.c.
Referenced by _zip_buffer_new_from_source(), _zip_cdir_write(), _zip_dirent_process_ef_utf_8(), _zip_dirent_process_winzip_aes(), _zip_dirent_read(), _zip_dirent_size(), _zip_dirent_write(), _zip_ef_parse(), _zip_ef_utf8(), _zip_ef_write(), _zip_find_central_dir(), _zip_read_cdir(), _zip_read_eocd64(), _zip_read_local_ef(), encrypt_header(), input(), pkware_encrypt(), trad_pkware_free(), winzip_aes_encrypt(), winzip_aes_free(), and write_data_descriptor().
zip_uint8_t* _zip_buffer_get | ( | zip_buffer_t * | buffer, |
zip_uint64_t | length | ||
) |
Definition at line 66 of file zip_buffer.c.
References _zip_buffer_peek(), length, NULL, and buffer::offset.
Referenced by _zip_buffer_get_16(), _zip_buffer_get_32(), _zip_buffer_get_64(), _zip_buffer_get_8(), _zip_buffer_put(), _zip_buffer_put_16(), _zip_buffer_put_32(), _zip_buffer_put_64(), _zip_buffer_put_8(), _zip_buffer_read(), _zip_dirent_process_ef_utf_8(), _zip_dirent_process_winzip_aes(), _zip_dirent_read(), _zip_ef_parse(), _zip_find_central_dir(), _zip_read_cdir(), _zip_read_data(), _zip_read_eocd(), and _zip_read_eocd64().
zip_uint16_t _zip_buffer_get_16 | ( | zip_buffer_t * | buffer | ) |
Definition at line 80 of file zip_buffer.c.
References _zip_buffer_get(), and NULL.
Referenced by _zip_dirent_process_winzip_aes(), _zip_dirent_read(), _zip_dirent_size(), _zip_ef_parse(), _zip_read_cdir(), _zip_read_eocd(), _zip_read_eocd64(), and _zip_read_local_ef().
zip_uint32_t _zip_buffer_get_32 | ( | zip_buffer_t * | buffer | ) |
Definition at line 92 of file zip_buffer.c.
References _zip_buffer_get(), and NULL.
Referenced by _zip_dirent_process_ef_utf_8(), _zip_dirent_read(), _zip_read_eocd(), and _zip_read_eocd64().
zip_uint64_t _zip_buffer_get_64 | ( | zip_buffer_t * | buffer | ) |
Definition at line 104 of file zip_buffer.c.
References _zip_buffer_get(), and NULL.
Referenced by _zip_dirent_read(), and _zip_read_eocd64().
zip_uint8_t _zip_buffer_get_8 | ( | zip_buffer_t * | buffer | ) |
Definition at line 116 of file zip_buffer.c.
References _zip_buffer_get(), and NULL.
Referenced by _zip_dirent_process_ef_utf_8(), and _zip_dirent_process_winzip_aes().
zip_uint64_t _zip_buffer_left | ( | zip_buffer_t * | buffer | ) |
Definition at line 128 of file zip_buffer.c.
References buffer::offset, and buffer::size.
Referenced by _zip_buffer_read(), _zip_dirent_process_ef_utf_8(), _zip_dirent_read(), _zip_ef_parse(), _zip_find_central_dir(), _zip_read_cdir(), and _zip_read_eocd().
zip_buffer_t* _zip_buffer_new | ( | zip_uint8_t * | data, |
zip_uint64_t | size | ||
) |
Definition at line 146 of file zip_buffer.c.
References free(), malloc(), NULL, buffer::offset, and buffer::size.
Referenced by _zip_buffer_new_from_source(), _zip_cdir_write(), _zip_dirent_process_ef_utf_8(), _zip_dirent_process_winzip_aes(), _zip_dirent_read(), _zip_dirent_write(), _zip_ef_parse(), _zip_ef_utf8(), _zip_ef_write(), _zip_read_cdir(), encrypt_header(), input(), winzip_aes_encrypt(), and write_data_descriptor().
zip_buffer_t* _zip_buffer_new_from_source | ( | zip_source_t * | src, |
zip_uint64_t | size, | ||
zip_uint8_t * | buf, | ||
zip_error_t * | error | ||
) |
Definition at line 174 of file zip_buffer.c.
References _zip_buffer_free(), _zip_buffer_new(), _zip_read(), error(), NULL, src, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_dirent_read(), _zip_dirent_size(), _zip_find_central_dir(), _zip_read_eocd64(), and _zip_read_local_ef().
zip_uint64_t _zip_buffer_offset | ( | zip_buffer_t * | buffer | ) |
Definition at line 192 of file zip_buffer.c.
References buffer::offset.
Referenced by _zip_cdir_write(), _zip_dirent_write(), _zip_ef_utf8(), _zip_read_cdir(), _zip_read_eocd(), _zip_read_eocd64(), and write_data_descriptor().
bool _zip_buffer_ok | ( | zip_buffer_t * | buffer | ) |
Definition at line 198 of file zip_buffer.c.
Referenced by _zip_cdir_write(), _zip_dirent_read(), _zip_dirent_write(), _zip_ef_parse(), _zip_ef_utf8(), _zip_ef_write(), _zip_read_eocd64(), and write_data_descriptor().
zip_uint8_t* _zip_buffer_peek | ( | zip_buffer_t * | buffer, |
zip_uint64_t | length | ||
) |
Definition at line 204 of file zip_buffer.c.
References length, NULL, buffer::offset, and buffer::size.
Referenced by _zip_buffer_get().
int _zip_buffer_put | ( | zip_buffer_t * | buffer, |
const void * | src, | ||
size_t | length | ||
) |
Definition at line 217 of file zip_buffer.c.
References _zip_buffer_get(), dst, length, memcpy(), NULL, and src.
Referenced by _zip_cdir_write(), _zip_dirent_write(), _zip_ef_utf8(), and write_data_descriptor().
int _zip_buffer_put_16 | ( | zip_buffer_t * | buffer, |
zip_uint16_t | i | ||
) |
Definition at line 230 of file zip_buffer.c.
References _zip_buffer_get(), i, and NULL.
Referenced by _zip_cdir_write(), _zip_dirent_write(), and _zip_ef_write().
int _zip_buffer_put_32 | ( | zip_buffer_t * | buffer, |
zip_uint32_t | i | ||
) |
Definition at line 245 of file zip_buffer.c.
References _zip_buffer_get(), i, and NULL.
Referenced by _zip_cdir_write(), _zip_dirent_write(), _zip_ef_utf8(), and write_data_descriptor().
int _zip_buffer_put_64 | ( | zip_buffer_t * | buffer, |
zip_uint64_t | i | ||
) |
Definition at line 262 of file zip_buffer.c.
References _zip_buffer_get(), i, and NULL.
Referenced by _zip_cdir_write(), _zip_dirent_write(), input(), and write_data_descriptor().
int _zip_buffer_put_8 | ( | zip_buffer_t * | buffer, |
zip_uint8_t | i | ||
) |
Definition at line 283 of file zip_buffer.c.
References _zip_buffer_get(), i, and NULL.
Referenced by _zip_dirent_write(), and _zip_ef_utf8().
zip_uint64_t _zip_buffer_read | ( | zip_buffer_t * | buffer, |
zip_uint8_t * | data, | ||
zip_uint64_t | length | ||
) |
Definition at line 134 of file zip_buffer.c.
References _zip_buffer_get(), _zip_buffer_left(), length, and memcpy().
Referenced by pkware_encrypt(), and winzip_aes_encrypt().
int _zip_buffer_set_offset | ( | zip_buffer_t * | buffer, |
zip_uint64_t | offset | ||
) |
Definition at line 297 of file zip_buffer.c.
References buffer::offset, and buffer::size.
Referenced by _zip_buffer_skip(), _zip_dirent_read(), _zip_ef_write(), _zip_find_central_dir(), _zip_read_cdir(), and _zip_read_eocd64().
zip_uint64_t _zip_buffer_size | ( | zip_buffer_t * | buffer | ) |
Definition at line 322 of file zip_buffer.c.
References buffer::size.
Referenced by _zip_read_eocd64().
int _zip_buffer_skip | ( | zip_buffer_t * | buffer, |
zip_uint64_t | length | ||
) |
Definition at line 311 of file zip_buffer.c.
References _zip_buffer_set_offset(), length, and buffer::offset.
Referenced by _zip_dirent_read().
void _zip_cdir_free | ( | zip_cdir_t * | cd | ) |
Definition at line 49 of file zip_dirent.c.
References _zip_entry_finalize(), _zip_string_free(), cd, free(), and i.
Referenced by _zip_cdir_new(), _zip_find_central_dir(), and _zip_read_cdir().
bool _zip_cdir_grow | ( | zip_cdir_t * | cd, |
zip_uint64_t | additional_entries, | ||
zip_error_t * | error | ||
) |
Definition at line 88 of file zip_dirent.c.
References _zip_entry_init(), cd, error(), i, NULL, realloc(), SIZE_MAX, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_cdir_new(), and _zip_read_cdir().
zip_cdir_t* _zip_cdir_new | ( | zip_uint64_t | nentry, |
zip_error_t * | error | ||
) |
Definition at line 64 of file zip_dirent.c.
References _zip_cdir_free(), _zip_cdir_grow(), cd, error(), malloc(), NULL, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_read_eocd(), and _zip_read_eocd64().
zip_int64_t _zip_cdir_write | ( | zip_t * | za, |
const zip_filelist_t * | filelist, | ||
zip_uint64_t | survivors | ||
) |
Definition at line 121 of file zip_dirent.c.
References _zip_buffer_data(), _zip_buffer_free(), _zip_buffer_new(), _zip_buffer_offset(), _zip_buffer_ok(), _zip_buffer_put(), _zip_buffer_put_16(), _zip_buffer_put_32(), _zip_buffer_put_64(), _zip_dirent_write(), _zip_error_set_from_source(), _zip_write(), zip::comment_changed, zip::comment_changes, zip::comment_orig, zip::entry, EOCD64_MAGIC, EOCD64LEN, EOCD64LOC_MAGIC, EOCD64LOCLEN, EOCD_MAGIC, EOCDLEN, zip::error, i, zip_filelist::idx, zip_string::length, NULL, off, zip_string::raw, zip::src, za, ZIP_ER_INTERNAL, ZIP_ER_MEMORY, zip_error_set(), ZIP_FL_CENTRAL, zip_source_tell_write(), ZIP_UINT16_MAX, and ZIP_UINT32_MAX.
Referenced by write_cdir().
int _zip_changed | ( | const zip_t * | za, |
zip_uint64_t * | survivorsp | ||
) |
Definition at line 655 of file zip_close.c.
References zip::ch_flags, zip::comment_changed, zip_entry::deleted, zip::entry, zip::flags, i, zip::nentry, za, and ZIP_ENTRY_HAS_CHANGES.
Referenced by zip_close(), and zip_set_archive_flag().
zip_uint8_t* _zip_cp437_to_utf8 | ( | const zip_uint8_t * const | _cp437buf, |
zip_uint32_t | len, | ||
zip_uint32_t * | utf8_lenp, | ||
zip_error_t * | error | ||
) |
Definition at line 198 of file zip_utf-8.c.
References _cp437_to_unicode, _zip_unicode_to_utf8(), _zip_unicode_to_utf8_len(), buflen, error(), i, len, malloc(), NULL, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_string_get().
time_t _zip_d2u_time | ( | zip_uint16_t | dtime, |
zip_uint16_t | ddate | ||
) |
Definition at line 1004 of file zip_dirent.c.
References memset().
Referenced by _zip_dirent_read(), and zip_file_set_dostime().
void _zip_deregister_source | ( | zip_t * | za, |
zip_source_t * | src | ||
) |
Definition at line 306 of file zip_source_window.c.
References i, zip::nopen_source, zip::open_source, src, and za.
Referenced by zip_source_free().
void _zip_dirent_apply_attributes | ( | zip_dirent_t * | de, |
zip_file_attributes_t * | attributes, | ||
bool | force_zip64, | ||
zip_uint32_t | changed | ||
) |
Definition at line 1117 of file zip_dirent.c.
References _zip_dirent_needs_zip64(), _zip_string_length(), zip_file_attributes::ascii, zip_dirent::bitflags, zip_dirent::comp_method, zip_dirent::encryption_method, zip_dirent::ext_attrib, zip_file_attributes::external_file_attributes, zip_dirent::filename, zip_file_attributes::general_purpose_bit_flags, zip_file_attributes::general_purpose_bit_mask, zip_file_attributes::host_system, zip_dirent::int_attrib, length, mask, zip_string::raw, zip_file_attributes::valid, zip_dirent::version_madeby, zip_file_attributes::version_needed, zip_dirent::version_needed, ZIP_CM_BZIP2, ZIP_CM_DEFLATE, ZIP_CM_LZMA, ZIP_DIRENT_ATTRIBUTES, ZIP_EM_AES_128, ZIP_EM_AES_192, ZIP_EM_AES_256, ZIP_EM_TRAD_PKWARE, ZIP_FILE_ATTRIBUTES_ASCII, ZIP_FILE_ATTRIBUTES_EXTERNAL_FILE_ATTRIBUTES, ZIP_FILE_ATTRIBUTES_GENERAL_PURPOSE_BIT_FLAGS, ZIP_FILE_ATTRIBUTES_GENERAL_PURPOSE_BIT_FLAGS_ALLOWED_MASK, ZIP_FILE_ATTRIBUTES_HOST_SYSTEM, ZIP_FILE_ATTRIBUTES_VERSION_NEEDED, and ZIP_MAX.
Referenced by add_data().
zip_dirent_t* _zip_dirent_clone | ( | const zip_dirent_t * | sde | ) |
Definition at line 215 of file zip_dirent.c.
References _zip_dirent_init(), zip_dirent::changed, zip_dirent::cloned, malloc(), memcpy(), and NULL.
Referenced by _zip_file_extra_field_prepare_for_change(), _zip_file_replace(), _zip_set_name(), zip_close(), zip_file_set_comment(), zip_file_set_encryption(), zip_file_set_external_attributes(), zip_file_set_mtime(), and zip_set_file_compression().
void _zip_dirent_finalize | ( | zip_dirent_t * | zde | ) |
Definition at line 234 of file zip_dirent.c.
References _zip_crypto_clear, _zip_ef_free(), _zip_string_free(), zip_dirent::changed, zip_dirent::cloned, zip_dirent::comment, zip_dirent::extra_fields, zip_dirent::filename, free(), NULL, zip_dirent::password, ZIP_DIRENT_COMMENT, ZIP_DIRENT_EXTRA_FIELD, ZIP_DIRENT_FILENAME, and ZIP_DIRENT_PASSWORD.
Referenced by _zip_checkcons(), and _zip_dirent_free().
void _zip_dirent_free | ( | zip_dirent_t * | zde | ) |
Definition at line 258 of file zip_dirent.c.
References _zip_dirent_finalize(), free(), and NULL.
Referenced by _zip_entry_finalize(), _zip_set_name(), _zip_unchange(), _zip_unchange_data(), zip_file_set_comment(), zip_file_set_encryption(), zip_file_set_external_attributes(), and zip_set_file_compression().
void _zip_dirent_init | ( | zip_dirent_t * | de | ) |
Definition at line 268 of file zip_dirent.c.
References zip_dirent::bitflags, zip_dirent::changed, zip_dirent::cloned, zip_dirent::comment, zip_dirent::comp_method, zip_dirent::comp_size, zip_dirent::compression_level, zip_dirent::crc, zip_dirent::crc_valid, zip_dirent::disk_number, zip_dirent::encryption_method, zip_dirent::ext_attrib, zip_dirent::extra_fields, zip_dirent::filename, zip_dirent::int_attrib, zip_dirent::last_mod, zip_dirent::local_extra_fields_read, NULL, zip_dirent::offset, zip_dirent::password, zip_dirent::uncomp_size, zip_dirent::version_madeby, zip_dirent::version_needed, ZIP_CM_DEFAULT, ZIP_EM_NONE, ZIP_EXT_ATTRIB_DEFAULT, and ZIP_OPSYS_DEFAULT.
Referenced by _zip_checkcons(), _zip_dirent_clone(), _zip_dirent_new(), and _zip_dirent_read().
bool _zip_dirent_needs_zip64 | ( | const zip_dirent_t * | de, |
zip_flags_t | flags | ||
) |
Definition at line 296 of file zip_dirent.c.
References zip_dirent::comp_size, flags, zip_dirent::offset, zip_dirent::uncomp_size, ZIP_FL_CENTRAL, and ZIP_UINT32_MAX.
Referenced by _zip_dirent_apply_attributes(), _zip_dirent_write(), _zip_file_get_end(), and zip_close().
zip_dirent_t* _zip_dirent_new | ( | void | ) |
Definition at line 305 of file zip_dirent.c.
References _zip_dirent_init(), malloc(), and NULL.
Referenced by _zip_read_cdir().
zip_int64_t _zip_dirent_read | ( | zip_dirent_t * | zde, |
zip_source_t * | src, | ||
zip_buffer_t * | buffer, | ||
bool | local, | ||
zip_error_t * | error | ||
) |
Definition at line 327 of file zip_dirent.c.
References _zip_buffer_eof(), _zip_buffer_free(), _zip_buffer_get(), _zip_buffer_get_16(), _zip_buffer_get_32(), _zip_buffer_get_64(), _zip_buffer_left(), _zip_buffer_new(), _zip_buffer_new_from_source(), _zip_buffer_ok(), _zip_buffer_set_offset(), _zip_buffer_skip(), _zip_d2u_time(), _zip_dirent_init(), _zip_dirent_process_ef_utf_8(), _zip_dirent_process_winzip_aes(), _zip_ef_get_by_id(), _zip_ef_parse(), _zip_ef_remove_internal(), _zip_guess_encoding(), _zip_read_data(), _zip_read_string(), zip_dirent::bitflags, CDENTRYSIZE, CENTRAL_MAGIC, zip_dirent::comment, zip_dirent::comp_method, zip_dirent::comp_size, zip_dirent::crc, zip_dirent::disk_number, EFBIG, zip_dirent::encryption_method, error(), zip_dirent::ext_attrib, zip_dirent::extra_fields, zip_dirent::filename, free(), zip_dirent::int_attrib, zip_dirent::last_mod, LENTRYSIZE, local, zip_dirent::local_extra_fields_read, LOCAL_MAGIC, NULL, zip_dirent::offset, ok, src, zip_dirent::uncomp_size, zip_dirent::version_madeby, zip_dirent::version_needed, ZIP_EF_CENTRAL, ZIP_EF_LOCAL, ZIP_EF_UTF_8_COMMENT, ZIP_EF_UTF_8_NAME, ZIP_EF_ZIP64, ZIP_EM_NONE, ZIP_EM_TRAD_PKWARE, ZIP_EM_UNKNOWN, ZIP_ENCODING_ERROR, ZIP_ENCODING_UTF8_KNOWN, ZIP_ER_DETAIL_INVALID_UTF8_IN_COMMENT, ZIP_ER_DETAIL_INVALID_UTF8_IN_FILENAME, ZIP_ER_DETAIL_INVALID_ZIP64_EF, ZIP_ER_DETAIL_VARIABLE_SIZE_OVERFLOW, ZIP_ER_EOF, ZIP_ER_INCONS, ZIP_ER_INTERNAL, ZIP_ER_MEMORY, ZIP_ER_NOZIP, ZIP_ER_SEEK, zip_error_code_zip(), zip_error_set(), ZIP_GPBF_ENCODING_UTF_8, ZIP_GPBF_ENCRYPTED, ZIP_GPBF_STRONG_ENCRYPTION, ZIP_INT64_MAX, ZIP_UINT16_MAX, and ZIP_UINT32_MAX.
Referenced by _zip_checkcons(), and _zip_read_cdir().
void _zip_dirent_set_version_needed | ( | zip_dirent_t * | de, |
bool | force_zip64 | ||
) |
zip_int32_t _zip_dirent_size | ( | zip_source_t * | src, |
zip_uint16_t | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 721 of file zip_dirent.c.
References _zip_buffer_eof(), _zip_buffer_free(), _zip_buffer_get_16(), _zip_buffer_new_from_source(), _zip_error_set_from_source(), b, CDENTRYSIZE, error(), flags, i, LENTRYSIZE, local, NULL, SEEK_CUR, src, ZIP_EF_LOCAL, ZIP_ER_INTERNAL, zip_error_set(), and zip_source_seek().
Referenced by _zip_file_get_offset().
int _zip_dirent_write | ( | zip_t * | za, |
zip_dirent_t * | dirent, | ||
zip_flags_t | flags | ||
) |
Definition at line 765 of file zip_dirent.c.
References _zip_buffer_free(), _zip_buffer_new(), _zip_buffer_offset(), _zip_buffer_ok(), _zip_buffer_put(), _zip_buffer_put_16(), _zip_buffer_put_32(), _zip_buffer_put_64(), _zip_buffer_put_8(), _zip_dirent_needs_zip64(), _zip_ef_free(), _zip_ef_new(), _zip_ef_size(), _zip_ef_utf8(), _zip_ef_write(), _zip_guess_encoding(), _zip_string_length(), _zip_string_write(), _zip_u2d_time(), _zip_write(), zip_dirent::bitflags, CDENTRYSIZE, CENTRAL_MAGIC, zip_dirent::comment, zip_dirent::comp_method, zip_dirent::comp_size, zip_dirent::crc, zip_dirent::disk_number, ef, EF_WINZIP_AES_SIZE, EFZIP64SIZE, zip_dirent::encryption_method, zip::error, zip_dirent::ext_attrib, zip_dirent::extra_fields, zip_dirent::filename, flags, zip_dirent::int_attrib, zip_dirent::last_mod, LOCAL_MAGIC, zip_extra_field::next, NULL, zip_dirent::offset, zip_dirent::uncomp_size, zip_dirent::version_madeby, zip_dirent::version_needed, za, ZIP_CM_WINZIP_AES, ZIP_EF_BOTH, ZIP_EF_UTF_8_COMMENT, ZIP_EF_UTF_8_NAME, ZIP_EF_WINZIP_AES, ZIP_EF_ZIP64, ZIP_EM_AES_128, ZIP_EM_AES_192, ZIP_EM_AES_256, ZIP_EM_NONE, ZIP_ENCODING_ASCII, ZIP_ENCODING_UNKNOWN, ZIP_ENCODING_UTF8_KNOWN, ZIP_ER_INTERNAL, ZIP_ER_MEMORY, zip_error_set(), ZIP_FL_FORCE_ZIP64, ZIP_FL_LOCAL, ZIP_GPBF_ENCODING_UTF_8, ZIP_GPBF_ENCRYPTED, ZIP_MAX, and ZIP_UINT32_MAX.
Referenced by _zip_cdir_write(), add_data(), and zip_close().
zip_extra_field_t* _zip_ef_clone | ( | const zip_extra_field_t * | ef, |
zip_error_t * | error | ||
) |
Definition at line 41 of file zip_extra_field.c.
References _zip_ef_free(), _zip_ef_new(), ef::data, def(), error(), ef::flags, test-lz4-versions::head, ef::id, zip_extra_field::next, NULL, ef::size, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_file_extra_field_prepare_for_change().
zip_extra_field_t* _zip_ef_delete_by_id | ( | zip_extra_field_t * | ef, |
zip_uint16_t | id, | ||
zip_uint16_t | id_idx, | ||
zip_flags_t | flags | ||
) |
Definition at line 67 of file zip_extra_field.c.
References _zip_ef_free(), ef, flags, ef::flags, test-lz4-versions::head, i, id, ef::id, zip_extra_field::next, NULL, ZIP_EF_BOTH, and ZIP_EXTRA_FIELD_ALL.
Referenced by zip_file_extra_field_delete(), and zip_file_extra_field_delete_by_id().
void _zip_ef_free | ( | zip_extra_field_t * | ef | ) |
Definition at line 103 of file zip_extra_field.c.
References ef::data, and free().
Referenced by _zip_dirent_finalize(), _zip_dirent_write(), _zip_ef_clone(), _zip_ef_delete_by_id(), _zip_ef_merge(), _zip_ef_parse(), _zip_ef_remove_internal(), and zip_file_extra_field_set().
const zip_uint8_t* _zip_ef_get_by_id | ( | const zip_extra_field_t * | ef, |
zip_uint16_t * | lenp, | ||
zip_uint16_t | id, | ||
zip_uint16_t | id_idx, | ||
zip_flags_t | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 116 of file zip_extra_field.c.
References ef::data, ef, error(), flags, ef::flags, i, ef::id, NULL, ef::size, ZIP_EF_BOTH, ZIP_ER_NOENT, and zip_error_set().
Referenced by _zip_dirent_process_ef_utf_8(), _zip_dirent_process_winzip_aes(), _zip_dirent_read(), and zip_file_extra_field_get_by_id().
zip_extra_field_t* _zip_ef_merge | ( | zip_extra_field_t * | to, |
zip_extra_field_t * | from | ||
) |
Definition at line 144 of file zip_extra_field.c.
References _zip_ef_free(), zip_extra_field::data, zip_extra_field::flags, from, zip_extra_field::id, zip_extra_field::next, NULL, zip_extra_field::size, to, and ZIP_EF_BOTH.
Referenced by _zip_checkcons(), and _zip_read_local_ef().
zip_extra_field_t* _zip_ef_new | ( | zip_uint16_t | id, |
zip_uint16_t | size, | ||
const zip_uint8_t * | data, | ||
zip_flags_t | flags | ||
) |
Definition at line 178 of file zip_extra_field.c.
References _zip_memdup(), ef::data, ef, flags, ef::flags, free(), id, ef::id, malloc(), NULL, and ef::size.
Referenced by _zip_dirent_write(), _zip_ef_clone(), _zip_ef_parse(), _zip_ef_utf8(), and zip_file_extra_field_set().
bool _zip_ef_parse | ( | const zip_uint8_t * | data, |
zip_uint16_t | len, | ||
zip_flags_t | flags, | ||
zip_extra_field_t ** | ef_head_p, | ||
zip_error_t * | error | ||
) |
Definition at line 202 of file zip_extra_field.c.
References _zip_buffer_eof(), _zip_buffer_free(), _zip_buffer_get(), _zip_buffer_get_16(), _zip_buffer_left(), _zip_buffer_new(), _zip_buffer_ok(), _zip_ef_free(), _zip_ef_new(), ef, error(), flags, len, NULL, ZIP_ER_DETAIL_EF_TRAILING_GARBAGE, ZIP_ER_DETAIL_INVALID_EF_LENGTH, ZIP_ER_INCONS, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_dirent_read(), and _zip_read_local_ef().
zip_extra_field_t* _zip_ef_remove_internal | ( | zip_extra_field_t * | ef | ) |
Definition at line 271 of file zip_extra_field.c.
References _zip_ef_free(), ef, ef::id, zip_extra_field::next, NULL, and ZIP_EF_IS_INTERNAL.
Referenced by _zip_dirent_read(), and _zip_read_local_ef().
zip_uint16_t _zip_ef_size | ( | const zip_extra_field_t * | ef, |
zip_flags_t | flags | ||
) |
Definition at line 300 of file zip_extra_field.c.
References ef, flags, ef::flags, ef::size, and ZIP_EF_BOTH.
Referenced by _zip_dirent_write(), and zip_file_extra_field_set().
int _zip_ef_write | ( | zip_t * | za, |
const zip_extra_field_t * | ef, | ||
zip_flags_t | flags | ||
) |
Definition at line 314 of file zip_extra_field.c.
References _zip_buffer_free(), _zip_buffer_new(), _zip_buffer_ok(), _zip_buffer_put_16(), _zip_buffer_set_offset(), _zip_write(), b, ef::data, ef, zip::error, flags, ef::flags, ef::id, NULL, ef::size, za, ZIP_EF_BOTH, ZIP_ER_INTERNAL, and zip_error_set().
Referenced by _zip_dirent_write().
void _zip_entry_finalize | ( | zip_entry_t * | e | ) |
Definition at line 38 of file zip_entry.c.
References _zip_dirent_free(), _zip_unchange_data(), and e.
Referenced by _zip_cdir_free(), _zip_file_replace(), and zip_discard().
void _zip_entry_init | ( | zip_entry_t * | e | ) |
Definition at line 46 of file zip_entry.c.
Referenced by _zip_add_entry(), and _zip_cdir_grow().
void _zip_error_clear | ( | zip_error_t * | err | ) |
Definition at line 92 of file zip_error.c.
References err, NULL, and ZIP_ER_OK.
Referenced by _zip_name_locate(), zip_error_clear(), zip_file_error_clear(), and zip_source_open().
void _zip_error_copy | ( | zip_error_t * | dst, |
const zip_error_t * | src | ||
) |
Definition at line 102 of file zip_error.c.
References dst, NULL, and src.
Referenced by _zip_error_set_from_source(), _zip_file_exists(), _zip_find_central_dir(), _zip_open(), and zip_source_file_common_new().
void _zip_error_get | ( | const zip_error_t * | err, |
int * | zep, | ||
int * | sep | ||
) |
Definition at line 113 of file zip_error.c.
References err, zip_error_system_type(), and ZIP_ET_NONE.
Referenced by zip_error_get(), and zip_file_error_get().
void _zip_error_set_from_source | ( | zip_error_t * | err, |
zip_source_t * | src | ||
) |
Definition at line 135 of file zip_error.c.
References _zip_error_copy(), err, src, and zip_source_error().
Referenced by _zip_cdir_write(), _zip_checkcons(), _zip_dirent_size(), _zip_file_get_end(), _zip_file_get_offset(), _zip_find_central_dir(), _zip_open(), _zip_read(), _zip_read_cdir(), _zip_read_eocd64(), _zip_read_local_ef(), _zip_write(), add_data(), compress_callback(), compress_read(), copy_source(), crc_read(), decrypt_header(), encrypt_header(), pkware_decrypt(), pkware_encrypt(), verify_hmac(), window_read(), winzip_aes_decrypt(), winzip_aes_encrypt(), zip_close(), zip_fopen_index_encrypted(), zip_fread(), zip_fseek(), zip_ftell(), zip_open_from_source(), zip_source_get_file_attributes(), zip_source_open(), zip_source_stat(), and zip_source_winzip_aes_decode().
const zip_uint8_t* _zip_extract_extra_field_by_id | ( | zip_error_t * | , |
zip_uint16_t | , | ||
int | , | ||
const zip_uint8_t * | , | ||
zip_uint16_t | , | ||
zip_uint16_t * | |||
) |
int _zip_file_extra_field_prepare_for_change | ( | zip_t * | za, |
zip_uint64_t | idx | ||
) |
Definition at line 323 of file zip_extra_field_api.c.
References _zip_dirent_clone(), _zip_ef_clone(), _zip_read_local_ef(), e, zip::entry, zip::error, setup::idx, zip::nentry, NULL, za, ZIP_DIRENT_EXTRA_FIELD, ZIP_ER_INVAL, ZIP_ER_MEMORY, and zip_error_set().
Referenced by zip_file_extra_field_delete(), zip_file_extra_field_delete_by_id(), and zip_file_extra_field_set().
int _zip_file_fillbuf | ( | void * | , |
size_t | , | ||
zip_file_t * | |||
) |
zip_uint64_t _zip_file_get_end | ( | const zip_t * | za, |
zip_uint64_t | index, | ||
zip_error_t * | error | ||
) |
Definition at line 77 of file zip_file_get_offset.c.
References _zip_dirent_needs_zip64(), _zip_error_set_from_source(), _zip_file_get_offset(), DATADES_MAGIC, EFBIG, zip::entry, error(), zip_entry::orig, SEEK_SET, zip::src, za, ZIP_ER_SEEK, zip_error_set(), ZIP_GPBF_DATA_DESCRIPTOR, ZIP_INT64_MAX, zip_source_read(), and zip_source_seek().
Referenced by zip_close().
zip_uint64_t _zip_file_get_offset | ( | const zip_t * | za, |
zip_uint64_t | idx, | ||
zip_error_t * | error | ||
) |
Definition at line 48 of file zip_file_get_offset.c.
References _zip_dirent_size(), _zip_error_set_from_source(), EFBIG, zip::entry, error(), setup::idx, NULL, zip_dirent::offset, zip_entry::orig, SEEK_SET, zip::src, za, ZIP_EF_LOCAL, ZIP_ER_INTERNAL, ZIP_ER_SEEK, zip_error_set(), ZIP_INT64_MAX, and zip_source_seek().
Referenced by _zip_file_get_end(), window_read(), and zip_close().
zip_int64_t _zip_file_replace | ( | zip_t * | za, |
zip_uint64_t | idx, | ||
const char * | name, | ||
zip_source_t * | source, | ||
zip_flags_t | flags | ||
) |
Definition at line 55 of file zip_file_replace.c.
References _zip_add_entry(), _zip_dirent_clone(), _zip_entry_finalize(), _zip_name_locate(), _zip_set_name(), _zip_unchange_data(), zip_dirent::changed, zip_entry::changes, zip_dirent::comp_method, zip::entry, zip::error, flags, i, setup::idx, zip::nentry, NULL, zip_entry::orig, zip_entry::source, source, za, ZIP_CM_REPLACED_DEFAULT, ZIP_DIRENT_COMP_METHOD, ZIP_ER_MEMORY, ZIP_ER_RDONLY, zip_error_set(), ZIP_FL_OVERWRITE, ZIP_IS_RDONLY, and ZIP_UINT64_MAX.
Referenced by zip_dir_add(), zip_file_add(), and zip_file_replace().
zip_compression_algorithm_t* _zip_get_compression_algorithm | ( | zip_int32_t | method, |
bool | compress | ||
) |
Definition at line 93 of file zip_source_compress.c.
References implementation::compress, compress(), implementation::decompress, i, implementations, implementations_size, context::method, NULL, and ZIP_CM_ACTUAL.
Referenced by add_data(), compression_source_new(), and zip_compression_method_supported().
zip_dirent_t* _zip_get_dirent | ( | zip_t * | za, |
zip_uint64_t | idx, | ||
zip_flags_t | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 1064 of file zip_dirent.c.
References zip_entry::changes, zip_entry::deleted, zip::entry, zip::error, error(), flags, setup::idx, zip::nentry, NULL, zip_entry::orig, za, ZIP_ER_DELETED, ZIP_ER_INVAL, zip_error_set(), and ZIP_FL_UNCHANGED.
Referenced by _zip_get_name(), _zip_source_zip_new(), zip_file_extra_field_delete(), zip_file_extra_field_delete_by_id(), zip_file_extra_field_get(), zip_file_extra_field_get_by_id(), zip_file_extra_field_set(), zip_file_extra_fields_count(), zip_file_extra_fields_count_by_id(), zip_file_get_comment(), zip_file_get_external_attributes(), zip_file_set_comment(), zip_file_set_external_attributes(), zip_file_set_mtime(), and zip_stat_index().
zip_encryption_implementation _zip_get_encryption_implementation | ( | zip_uint16_t | method, |
int | operation | ||
) |
Definition at line 39 of file zip_get_encryption_implementation.c.
References NULL, ZIP_CODEC_DECODE, ZIP_EM_AES_128, ZIP_EM_AES_192, ZIP_EM_AES_256, ZIP_EM_TRAD_PKWARE, zip_source_pkware_decode(), zip_source_pkware_encode(), zip_source_winzip_aes_decode(), and zip_source_winzip_aes_encode().
Referenced by _zip_source_zip_new(), add_data(), zip_encryption_method_supported(), and zip_file_set_encryption().
const char* _zip_get_name | ( | zip_t * | za, |
zip_uint64_t | idx, | ||
zip_flags_t | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 47 of file zip_get_name.c.
References _zip_get_dirent(), _zip_string_get(), error(), zip_dirent::filename, flags, setup::idx, NULL, cmd_descs_generate::str, and za.
Referenced by _zip_name_locate(), _zip_unchange(), zip_delete(), and zip_get_name().
enum zip_encoding_type _zip_guess_encoding | ( | zip_string_t * | , |
enum | zip_encoding_type | ||
) |
bool _zip_hash_add | ( | zip_hash_t * | hash, |
const zip_uint8_t * | name, | ||
zip_uint64_t | index, | ||
zip_flags_t | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 205 of file zip_hash.c.
References error(), flags, HASH_MAX_FILL, HASH_MAX_SIZE, HASH_MIN_SIZE, hash_resize(), hash_string(), malloc(), name, entry::name, zip_hash::nentries, NULL, zip_hash::table, zip_hash::table_size, ZIP_ER_EXISTS, ZIP_ER_INVAL, ZIP_ER_MEMORY, zip_error_set(), ZIP_FL_UNCHANGED, and ZIP_INT64_MAX.
Referenced by _zip_open(), _zip_set_name(), and _zip_unchange().
bool _zip_hash_delete | ( | zip_hash_t * | hash, |
const zip_uint8_t * | key, | ||
zip_error_t * | error | ||
) |
Definition at line 264 of file zip_hash.c.
References error(), free(), HASH_MIN_FILL, HASH_MIN_SIZE, hash_resize(), hash_string(), entry::name, zip_hash::nentries, zip_hash_entry::next, NULL, zip_hash::table, zip_hash::table_size, ZIP_ER_INVAL, ZIP_ER_NOENT, and zip_error_set().
Referenced by _zip_set_name(), _zip_unchange(), and zip_delete().
void _zip_hash_free | ( | zip_hash_t * | hash | ) |
Definition at line 184 of file zip_hash.c.
References free(), free_list(), i, NULL, zip_hash::table, and zip_hash::table_size.
Referenced by zip_discard().
zip_int64_t _zip_hash_lookup | ( | zip_hash_t * | hash, |
const zip_uint8_t * | name, | ||
zip_flags_t | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 312 of file zip_hash.c.
References error(), flags, hash_string(), entry::name, zip_hash::nentries, NULL, zip_hash::table, zip_hash::table_size, ZIP_ER_INVAL, ZIP_ER_NOENT, zip_error_set(), and ZIP_FL_UNCHANGED.
Referenced by _zip_name_locate().
zip_hash_t* _zip_hash_new | ( | zip_error_t * | error | ) |
Definition at line 167 of file zip_hash.c.
References error(), malloc(), zip_hash::nentries, NULL, zip_hash::table, zip_hash::table_size, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_new().
bool _zip_hash_reserve_capacity | ( | zip_hash_t * | hash, |
zip_uint64_t | capacity, | ||
zip_error_t * | error | ||
) |
Definition at line 347 of file zip_hash.c.
References error(), hash_resize(), and size_for_capacity().
Referenced by _zip_open().
bool _zip_hash_revert | ( | zip_hash_t * | hash, |
zip_error_t * | error | ||
) |
Definition at line 369 of file zip_hash.c.
References error(), free(), HASH_MIN_FILL, HASH_MIN_SIZE, hash_resize(), i, zip_hash::nentries, zip_hash_entry::next, NULL, p, zip_hash::table, and zip_hash::table_size.
Referenced by zip_unchange_all().
void* _zip_memdup | ( | const void * | mem, |
size_t | len, | ||
zip_error_t * | error | ||
) |
Definition at line 41 of file zip_memdup.c.
References error(), len, malloc(), mem, memcpy(), NULL, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_ef_new().
zip_int64_t _zip_name_locate | ( | zip_t * | za, |
const char * | fname, | ||
zip_flags_t | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 50 of file zip_name_locate.c.
References _zip_error_clear(), _zip_get_name(), _zip_hash_lookup(), _zip_string_free(), _zip_string_get(), _zip_string_new(), cmp(), error(), flags, fn, create_tags_rz::fname, i, int, zip::names, zip::nentry, NULL, p, cmd_descs_generate::str, za, ZIP_ER_INVAL, ZIP_ER_NOENT, zip_error_set(), ZIP_FL_ENC_RAW, ZIP_FL_ENC_STRICT, ZIP_FL_ENC_UTF_8, ZIP_FL_NOCASE, and ZIP_FL_NODIR.
Referenced by _zip_file_replace(), _zip_set_name(), _zip_unchange(), and zip_name_locate().
zip_t* _zip_new | ( | zip_error_t * | error | ) |
Definition at line 45 of file zip_new.c.
References _zip_hash_new(), zip::ch_flags, zip::comment_changed, zip::comment_changes, zip::comment_orig, zip::default_password, zip::entry, zip::error, error(), zip::flags, free(), malloc(), zip::names, zip::nentry, zip::nentry_alloc, zip::nopen_source, zip::nopen_source_alloc, NULL, zip::open_flags, zip::open_source, zip::progress, zip::src, za, ZIP_ER_MEMORY, zip_error_init(), and zip_error_set().
Referenced by _zip_allocate_new().
zip_t* _zip_open | ( | zip_source_t * | src, |
unsigned int | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 146 of file zip_open.c.
References _zip_allocate_new(), _zip_error_copy(), _zip_error_set_from_source(), _zip_find_central_dir(), _zip_hash_add(), _zip_hash_reserve_capacity(), _zip_string_get(), zip::ch_flags, zip_cdir::comment, zip::comment_orig, zip::entry, zip_cdir::entry, EOPNOTSUPP, zip::error, error(), zip_dirent::filename, flags, zip::flags, free(), setup::idx, len, zip::names, zip::nentry, zip_cdir::nentry, zip::nentry_alloc, zip_cdir::nentry_alloc, NULL, zip_entry::orig, zip_stat::size, src, zip_stat::valid, za, ZIP_CHECKCONS, zip_discard(), ZIP_ER_EXISTS, ZIP_ER_SEEK, zip_error::zip_err, zip_error_set(), ZIP_FL_UNCHANGED, zip_source_accept_empty(), zip_source_keep(), zip_source_stat(), zip_stat_init(), and ZIP_STAT_SIZE.
Referenced by zip_open_from_source().
void _zip_pkware_decrypt | ( | zip_pkware_keys_t * | keys, |
zip_uint8_t * | out, | ||
const zip_uint8_t * | in, | ||
zip_uint64_t | len | ||
) |
Definition at line 95 of file zip_pkware.c.
References b, crypt_byte(), i, in, keys, len, NULL, out, autogen_x86imm::tmp, and update_keys().
Referenced by decrypt_header(), and pkware_decrypt().
void _zip_pkware_encrypt | ( | zip_pkware_keys_t * | keys, |
zip_uint8_t * | out, | ||
const zip_uint8_t * | in, | ||
zip_uint64_t | len | ||
) |
Definition at line 72 of file zip_pkware.c.
References b, crypt_byte(), i, in, keys, len, NULL, out, autogen_x86imm::tmp, and update_keys().
Referenced by encrypt_header(), and pkware_encrypt().
void _zip_pkware_keys_free | ( | zip_pkware_keys_t * | keys | ) |
zip_pkware_keys_t* _zip_pkware_keys_new | ( | zip_error_t * | error | ) |
void _zip_pkware_keys_reset | ( | zip_pkware_keys_t * | keys | ) |
Definition at line 64 of file zip_pkware.c.
References keys, PKWARE_KEY0, PKWARE_KEY1, and PKWARE_KEY2.
Referenced by pkware_decrypt(), and pkware_encrypt().
void _zip_progress_end | ( | zip_progress_t * | progress | ) |
Definition at line 68 of file zip_progress.c.
References _zip_progress_update().
Referenced by zip_close().
void _zip_progress_free | ( | zip_progress_t * | progress | ) |
Definition at line 74 of file zip_progress.c.
References _zip_progress_free_cancel_callback(), _zip_progress_free_progress_callback(), free(), and NULL.
Referenced by zip_discard(), zip_register_cancel_callback_with_state(), and zip_register_progress_callback_with_state().
int _zip_progress_start | ( | zip_progress_t * | progress | ) |
Definition at line 151 of file zip_progress.c.
References zip_progress::callback_cancel, zip_progress::callback_progress, zip_progress::last_update, NULL, zip_progress::ud_cancel, zip_progress::ud_progress, and zip_progress::za.
Referenced by zip_close().
int _zip_progress_subrange | ( | zip_progress_t * | progress, |
double | start, | ||
double | end | ||
) |
Definition at line 172 of file zip_progress.c.
References _zip_progress_update(), test_evm::end, zip_progress::end, NULL, start, and zip_progress::start.
Referenced by zip_close().
int _zip_progress_update | ( | zip_progress_t * | progress, |
double | value | ||
) |
Definition at line 184 of file zip_progress.c.
References zip_progress::callback_cancel, zip_progress::callback_progress, zip_progress::end, if(), zip_progress::last_update, NULL, zip_progress::precision, zip_progress::start, zip_progress::ud_cancel, zip_progress::ud_progress, zip_progress::za, ZIP_MAX, and ZIP_MIN.
Referenced by _zip_progress_end(), _zip_progress_subrange(), copy_data(), and copy_source().
int _zip_read | ( | zip_source_t * | src, |
zip_uint8_t * | data, | ||
zip_uint64_t | length, | ||
zip_error_t * | error | ||
) |
Definition at line 40 of file zip_io_util.c.
References _zip_error_set_from_source(), b, error(), length, n, src, ZIP_ER_EOF, ZIP_ER_INTERNAL, zip_error_set(), ZIP_INT64_MAX, and zip_source_read().
Referenced by _zip_buffer_new_from_source(), _zip_read_data(), and copy_data().
int _zip_read_at_offset | ( | zip_source_t * | src, |
zip_uint64_t | offset, | ||
unsigned char * | b, | ||
size_t | length, | ||
zip_error_t * | error | ||
) |
zip_uint8_t* _zip_read_data | ( | zip_buffer_t * | buffer, |
zip_source_t * | src, | ||
size_t | length, | ||
bool | nulp, | ||
zip_error_t * | error | ||
) |
Definition at line 63 of file zip_io_util.c.
References _zip_buffer_get(), _zip_read(), error(), free(), length, malloc(), memcpy(), NULL, r, src, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_dirent_read(), _zip_read_local_ef(), and _zip_read_string().
int _zip_read_local_ef | ( | zip_t * | za, |
zip_uint64_t | idx | ||
) |
Definition at line 351 of file zip_extra_field.c.
References _zip_buffer_eof(), _zip_buffer_free(), _zip_buffer_get_16(), _zip_buffer_new_from_source(), _zip_ef_merge(), _zip_ef_parse(), _zip_ef_remove_internal(), _zip_error_set_from_source(), _zip_read_data(), b, e, ef, EFBIG, zip::entry, zip::error, free(), setup::idx, zip::nentry, NULL, SEEK_CUR, SEEK_SET, zip::src, za, ZIP_EF_LOCAL, ZIP_ER_INTERNAL, ZIP_ER_INVAL, ZIP_ER_SEEK, zip_error_set(), ZIP_INT64_MAX, and zip_source_seek().
Referenced by _zip_file_extra_field_prepare_for_change(), zip_close(), zip_file_extra_field_get(), zip_file_extra_field_get_by_id(), zip_file_extra_fields_count(), and zip_file_extra_fields_count_by_id().
zip_string_t* _zip_read_string | ( | zip_buffer_t * | buffer, |
zip_source_t * | src, | ||
zip_uint16_t | length, | ||
bool | nulp, | ||
zip_error_t * | error | ||
) |
Definition at line 107 of file zip_io_util.c.
References _zip_read_data(), _zip_string_new(), error(), free(), len, NULL, s, src, and ZIP_FL_ENC_GUESS.
Referenced by _zip_dirent_read().
int _zip_register_source | ( | zip_t * | za, |
zip_source_t * | src | ||
) |
Definition at line 320 of file zip_source_window.c.
References zip::error, n, zip::nopen_source, zip::nopen_source_alloc, NULL, zip::open_source, realloc(), src, za, ZIP_ER_MEMORY, and zip_error_set().
Referenced by _zip_source_set_source_archive().
int _zip_set_name | ( | zip_t * | za, |
zip_uint64_t | idx, | ||
const char * | name, | ||
zip_flags_t | flags | ||
) |
Definition at line 42 of file zip_set_name.c.
References _zip_dirent_clone(), _zip_dirent_free(), _zip_guess_encoding(), _zip_hash_add(), _zip_hash_delete(), _zip_name_locate(), _zip_string_equal(), _zip_string_free(), _zip_string_get(), _zip_string_new(), e, zip::entry, zip::error, flags, i, setup::idx, zip::names, zip::nentry, NULL, cmd_descs_generate::str, za, ZIP_DIRENT_FILENAME, ZIP_ENCODING_UNKNOWN, ZIP_ENCODING_UTF8_GUESSED, ZIP_ENCODING_UTF8_KNOWN, ZIP_ER_EXISTS, ZIP_ER_INVAL, ZIP_ER_MEMORY, ZIP_ER_RDONLY, zip_error_set(), ZIP_FL_ENC_GUESS, ZIP_FL_ENCODING_ALL, and ZIP_IS_RDONLY.
Referenced by _zip_file_replace(), and zip_file_rename().
void _zip_set_open_error | ( | int * | zep, |
const zip_error_t * | err, | ||
int | ze | ||
) |
Definition at line 217 of file zip_open.c.
References err, zip_error_code_system(), zip_error_code_zip(), zip_error_system_type(), ZIP_ET_LIBZIP, and ZIP_ET_SYS.
Referenced by zip_fdopen(), and zip_open().
zip_int64_t _zip_source_call | ( | zip_source_t * | src, |
void * | data, | ||
zip_uint64_t | length, | ||
zip_source_cmd_t | command | ||
) |
Definition at line 39 of file zip_source_call.c.
References command, e, length, NULL, src, ZIP_ER_INTERNAL, ZIP_ER_OPNOTSUPP, zip_error_set(), ZIP_SOURCE_ERROR, ZIP_SOURCE_MAKE_COMMAND_BITMASK, and ZIP_SOURCE_SUPPORTS.
Referenced by zip_source_accept_empty(), zip_source_begin_write(), zip_source_begin_write_cloning(), zip_source_close(), zip_source_commit_write(), zip_source_free(), zip_source_get_file_attributes(), zip_source_open(), zip_source_read(), zip_source_remove(), zip_source_rollback_write(), zip_source_seek(), zip_source_seek_write(), zip_source_stat(), zip_source_tell(), zip_source_tell_write(), and zip_source_write().
bool _zip_source_eof | ( | zip_source_t * | src | ) |
zip_source_t* _zip_source_file_or_p | ( | const char * | , |
FILE * | , | ||
zip_uint64_t | , | ||
zip_int64_t | , | ||
const zip_stat_t * | , | ||
zip_error_t * | error | ||
) |
bool _zip_source_had_error | ( | zip_source_t * | src | ) |
Definition at line 44 of file zip_source_error.c.
References src, ZIP_ER_OK, zip_error::zip_err, and zip_source_error().
void _zip_source_invalidate | ( | zip_source_t * | src | ) |
Definition at line 129 of file zip_source_window.c.
References src, ZIP_ER_OK, ZIP_ER_ZIPCLOSED, zip_error_code_zip(), and zip_error_set().
Referenced by zip_discard().
zip_source_t* _zip_source_new | ( | zip_error_t * | error | ) |
Definition at line 76 of file zip_source_function.c.
References error(), malloc(), NULL, src, ZIP_ER_MEMORY, zip_error_init(), zip_error_set(), and ZIP_SOURCE_WRITE_CLOSED.
Referenced by zip_source_function_create(), and zip_source_layered_create().
int _zip_source_set_source_archive | ( | zip_source_t * | src, |
zip_t * | za | ||
) |
Definition at line 121 of file zip_source_window.c.
References _zip_register_source(), src, and za.
Referenced by _zip_source_zip_new().
zip_source_t* _zip_source_window_new | ( | zip_source_t * | src, |
zip_uint64_t | start, | ||
zip_int64_t | length, | ||
zip_stat_t * | st, | ||
zip_file_attributes_t * | attributes, | ||
zip_t * | source_archive, | ||
zip_uint64_t | source_index, | ||
zip_error_t * | error | ||
) |
Definition at line 68 of file zip_source_window.c.
References _zip_stat_merge(), window::attributes, ctx::error, error(), free(), length, malloc(), memcpy(), NULL, window::source_archive, window::source_index, src, start, window_read(), ZIP_ER_INVAL, ZIP_ER_MEMORY, zip_error_init(), zip_error_set(), zip_file_attributes_init(), ZIP_SOURCE_GET_FILE_ATTRIBUTES, zip_source_layered_create(), zip_source_make_command_bitmap(), ZIP_SOURCE_MAKE_COMMAND_BITMASK, ZIP_SOURCE_SEEK, ZIP_SOURCE_SUPPORTS, zip_source_supports(), ZIP_SOURCE_SUPPORTS_SEEKABLE, ZIP_SOURCE_TELL, and zip_stat_init().
Referenced by _zip_source_zip_new(), add_data(), and zip_source_window_create().
zip_source_t* _zip_source_zip_new | ( | zip_t * | srcza, |
zip_uint64_t | srcidx, | ||
zip_flags_t | flags, | ||
zip_uint64_t | start, | ||
zip_uint64_t | len, | ||
const char * | password, | ||
zip_error_t * | error | ||
) |
Definition at line 41 of file zip_source_zip_new.c.
References _zip_file_attributes_from_dirent(), _zip_get_dirent(), _zip_get_encryption_implementation(), _zip_source_set_source_archive(), _zip_source_window_new(), zip_stat::comp_method, zip_stat::comp_size, zip::default_password, zip_entry::deleted, zip_stat::encryption_method, zip::entry, error(), flags, len, zip_stat::mtime, zip::nentry, NULL, s2, zip_stat::size, zip::src, src, start, zip_stat::valid, ZIP_CM_STORE, ZIP_CODEC_DECODE, ZIP_EM_NONE, ZIP_ENTRY_DATA_CHANGED, ZIP_ER_CHANGED, ZIP_ER_ENCRNOTSUPP, ZIP_ER_INTERNAL, ZIP_ER_INVAL, ZIP_ER_NOPASSWD, zip_error_set(), ZIP_FL_COMPRESSED, ZIP_FL_ENCRYPTED, ZIP_FL_UNCHANGED, ZIP_INT64_MAX, zip_source_buffer_with_attributes_create(), zip_source_crc_create(), zip_source_decompress(), zip_source_free(), zip_source_window_create(), ZIP_STAT_COMP_METHOD, ZIP_STAT_COMP_SIZE, zip_stat_index(), ZIP_STAT_MTIME, and ZIP_STAT_SIZE.
Referenced by zip_close(), zip_fopen_index_encrypted(), and zip_source_zip_create().
int _zip_stat_merge | ( | zip_stat_t * | dst, |
const zip_stat_t * | src, | ||
zip_error_t * | error | ||
) |
Definition at line 54 of file zip_stat_init.c.
References dst, src, ZIP_STAT_COMP_METHOD, ZIP_STAT_COMP_SIZE, ZIP_STAT_CRC, ZIP_STAT_ENCRYPTION_METHOD, ZIP_STAT_FLAGS, ZIP_STAT_INDEX, ZIP_STAT_MTIME, and ZIP_STAT_SIZE.
Referenced by _zip_source_window_new(), and window_read().
zip_uint32_t _zip_string_crc32 | ( | const zip_string_t * | string | ) |
Definition at line 42 of file zip_string.c.
References crc32(), L, NULL, s, and Z_NULL.
Referenced by _zip_dirent_process_ef_utf_8(), and _zip_ef_utf8().
int _zip_string_equal | ( | const zip_string_t * | a, |
const zip_string_t * | b | ||
) |
Definition at line 55 of file zip_string.c.
Referenced by _zip_headercomp(), _zip_set_name(), zip_file_set_comment(), and zip_set_archive_comment().
void _zip_string_free | ( | zip_string_t * | string | ) |
Definition at line 69 of file zip_string.c.
References free(), NULL, and s.
Referenced by _zip_cdir_free(), _zip_dirent_finalize(), _zip_dirent_process_ef_utf_8(), _zip_name_locate(), _zip_set_name(), _zip_string_new(), zip_discard(), zip_file_set_comment(), zip_set_archive_comment(), and zip_unchange_archive().
const zip_uint8_t* _zip_string_get | ( | zip_string_t * | string, |
zip_uint32_t * | lenp, | ||
zip_flags_t | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 80 of file zip_string.c.
References _zip_cp437_to_utf8(), _zip_guess_encoding(), zip_string::converted, zip_string::converted_length, zip_string::encoding, error(), flags, zip_string::length, NULL, zip_string::raw, ZIP_ENCODING_ASCII, ZIP_ENCODING_CP437, ZIP_ENCODING_UNKNOWN, ZIP_ENCODING_UTF8_KNOWN, ZIP_FL_ENC_RAW, and ZIP_FL_ENC_STRICT.
Referenced by _zip_ef_utf8(), _zip_get_name(), _zip_name_locate(), _zip_open(), _zip_set_name(), zip_file_get_comment(), and zip_get_archive_comment().
zip_uint16_t _zip_string_length | ( | const zip_string_t * | string | ) |
Definition at line 112 of file zip_string.c.
Referenced by _zip_checkcons(), _zip_dirent_apply_attributes(), and _zip_dirent_write().
zip_string_t* _zip_string_new | ( | const zip_uint8_t * | raw, |
zip_uint16_t | length, | ||
zip_flags_t | flags, | ||
zip_error_t * | error | ||
) |
Definition at line 121 of file zip_string.c.
References _zip_guess_encoding(), _zip_string_free(), error(), flags, free(), length, malloc(), memcpy(), NULL, s, ZIP_ENCODING_CP437, ZIP_ENCODING_ERROR, ZIP_ENCODING_UNKNOWN, ZIP_ENCODING_UTF8_KNOWN, ZIP_ER_INVAL, ZIP_ER_MEMORY, zip_error_set(), ZIP_FL_ENC_CP437, ZIP_FL_ENC_GUESS, ZIP_FL_ENC_UTF_8, and ZIP_FL_ENCODING_ALL.
Referenced by _zip_dirent_process_ef_utf_8(), _zip_name_locate(), _zip_read_cdir(), _zip_read_string(), _zip_set_name(), zip_file_set_comment(), and zip_set_archive_comment().
int _zip_string_write | ( | zip_t * | za, |
const zip_string_t * | string | ||
) |
Definition at line 173 of file zip_string.c.
References _zip_write(), NULL, s, and za.
Referenced by _zip_dirent_write().
void _zip_u2d_time | ( | time_t | intime, |
zip_uint16_t * | dtime, | ||
zip_uint16_t * | ddate | ||
) |
Definition at line 1090 of file zip_dirent.c.
References NULL.
Referenced by _zip_dirent_write(), decrypt_header(), and encrypt_header().
int _zip_unchange | ( | zip_t * | za, |
zip_uint64_t | idx, | ||
int | allow_duplicates | ||
) |
Definition at line 47 of file zip_unchange.c.
References _zip_dirent_free(), _zip_get_name(), _zip_hash_add(), _zip_hash_delete(), _zip_name_locate(), _zip_unchange_data(), zip_dirent::changed, zip_entry::changes, zip_entry::deleted, zip::entry, zip::error, i, setup::idx, zip::names, zip::nentry, NULL, zip_entry::orig, za, ZIP_DIRENT_FILENAME, ZIP_ER_EXISTS, ZIP_ER_INVAL, zip_error_set(), and ZIP_FL_UNCHANGED.
Referenced by zip_delete(), zip_unchange(), and zip_unchange_all().
void _zip_unchange_data | ( | zip_entry_t * | ze | ) |
Definition at line 38 of file zip_unchange_data.c.
References _zip_dirent_free(), zip_dirent::changed, zip_entry::changes, zip_dirent::comp_method, zip_entry::deleted, NULL, zip_entry::source, ZIP_CM_REPLACED_DEFAULT, ZIP_DIRENT_COMP_METHOD, and zip_source_free().
Referenced by _zip_entry_finalize(), _zip_file_replace(), and _zip_unchange().
bool _zip_winzip_aes_decrypt | ( | zip_winzip_aes_t * | ctx, |
zip_uint8_t * | data, | ||
zip_uint64_t | length | ||
) |
Definition at line 142 of file zip_winzip_aes.c.
References _zip_crypto_hmac, aes_crypt(), and length.
Referenced by winzip_aes_decrypt().
bool _zip_winzip_aes_encrypt | ( | zip_winzip_aes_t * | ctx, |
zip_uint8_t * | data, | ||
zip_uint64_t | length | ||
) |
Definition at line 136 of file zip_winzip_aes.c.
References _zip_crypto_hmac, aes_crypt(), and length.
Referenced by winzip_aes_encrypt().
bool _zip_winzip_aes_finish | ( | zip_winzip_aes_t * | ctx, |
zip_uint8_t * | hmac | ||
) |
Definition at line 148 of file zip_winzip_aes.c.
References _zip_crypto_hmac_output.
Referenced by verify_hmac(), and winzip_aes_encrypt().
void _zip_winzip_aes_free | ( | zip_winzip_aes_t * | ctx | ) |
Definition at line 154 of file zip_winzip_aes.c.
References _zip_crypto_aes_free(), _zip_crypto_hmac_free(), free(), and NULL.
Referenced by decrypt_header(), encrypt_header(), verify_hmac(), winzip_aes_encrypt(), and winzip_aes_free().
zip_winzip_aes_t* _zip_winzip_aes_new | ( | const zip_uint8_t * | password, |
zip_uint64_t | password_length, | ||
const zip_uint8_t * | salt, | ||
zip_uint16_t | key_size, | ||
zip_uint8_t * | password_verify, | ||
zip_error_t * | error | ||
) |
Definition at line 78 of file zip_winzip_aes.c.
References _zip_crypto_aes_free(), _zip_crypto_aes_new(), _zip_crypto_clear, _zip_crypto_hmac_new(), _zip_crypto_pbkdf2, error(), free(), malloc(), MAX_KEY_LENGTH, memcpy(), memset(), NULL, PBKDF2_ITERATIONS, WINZIP_AES_PASSWORD_VERIFY_LENGTH, ZIP_CRYPTO_AES_BLOCK_LENGTH, ZIP_EM_AES_128, ZIP_EM_AES_192, ZIP_EM_AES_256, ZIP_ER_INVAL, ZIP_ER_MEMORY, and zip_error_set().
Referenced by decrypt_header(), and encrypt_header().
int _zip_write | ( | zip_t * | za, |
const void * | data, | ||
zip_uint64_t | length | ||
) |
Definition at line 121 of file zip_io_util.c.
References _zip_error_set_from_source(), EINTR, zip::error, length, n, zip::src, za, ZIP_ER_WRITE, zip_error_set(), and zip_source_write().
Referenced by _zip_cdir_write(), _zip_dirent_write(), _zip_ef_write(), _zip_string_write(), copy_data(), copy_source(), and write_data_descriptor().
const zip_uint8_t* zip_get_extra_field_by_id | ( | zip_t * | , |
int | , | ||
int | , | ||
zip_uint16_t | , | ||
int | , | ||
zip_uint16_t * | |||
) |
zip_uint32_t zip_random_uint32 | ( | void | ) |
Definition at line 87 of file zip_random_unix.c.
References NULL, time, value, and zip_secure_random().
Referenced by create_temp_file().
ZIP_EXTERN bool zip_secure_random | ( | zip_uint8_t * | buffer, |
zip_uint16_t | length | ||
) |
bool zip_source_accept_empty | ( | zip_source_t * | src | ) |
Definition at line 39 of file zip_source_accept_empty.c.
References _zip_source_call(), int, NULL, src, ZIP_SOURCE_ACCEPT_EMPTY, ZIP_SOURCE_IS_LAYERED, ZIP_SOURCE_MAKE_COMMAND_BITMASK, and zip_source_supports().
Referenced by _zip_open().
zip_source_t* zip_source_buffer_with_attributes | ( | zip_t * | za, |
const void * | data, | ||
zip_uint64_t | len, | ||
int | freep, | ||
zip_file_attributes_t * | attributes | ||
) |
Definition at line 180 of file zip_source_buffer.c.
References read_data::attributes, zip::error, len, za, and zip_source_buffer_with_attributes_create().
zip_source_t* zip_source_buffer_with_attributes_create | ( | const void * | data, |
zip_uint64_t | len, | ||
int | freep, | ||
zip_file_attributes_t * | attributes, | ||
zip_error_t * | error | ||
) |
Definition at line 103 of file zip_source_buffer.c.
References zip_buffer_fragment::data, error(), len, zip_buffer_fragment::length, NULL, ZIP_ER_INVAL, zip_error_set(), and zip_source_buffer_fragment_with_attributes_create().
Referenced by _zip_source_zip_new(), zip_source_buffer(), zip_source_buffer_create(), and zip_source_buffer_with_attributes().
zip_source_t* zip_source_compress | ( | zip_t * | za, |
zip_source_t * | src, | ||
zip_int32_t | cm, | ||
int | compression_flags | ||
) |
Definition at line 120 of file zip_source_compress.c.
References compression_source_new(), context::method, src, and za.
Referenced by add_data().
zip_source_t* zip_source_crc_create | ( | zip_source_t * | src, |
int | validate, | ||
zip_error_t * | error | ||
) |
Definition at line 55 of file zip_source_crc.c.
References crc32(), crc_read(), ctx::error, error(), malloc(), NULL, src, validate(), ZIP_ER_INVAL, ZIP_ER_MEMORY, zip_error_init(), zip_error_set(), and zip_source_layered_create().
Referenced by _zip_source_zip_new(), and add_data().
zip_source_t* zip_source_decompress | ( | zip_t * | za, |
zip_source_t * | src, | ||
zip_int32_t | cm | ||
) |
Definition at line 125 of file zip_source_compress.c.
References compression_source_new(), context::method, src, and za.
Referenced by _zip_source_zip_new(), and add_data().
zip_source_t* zip_source_layered | ( | zip_t * | za, |
zip_source_t * | src, | ||
zip_source_layered_callback | cb, | ||
void * | ud | ||
) |
Definition at line 41 of file zip_source_layered.c.
References cb, zip::error, NULL, src, za, and zip_source_layered_create().
Referenced by compression_source_new(), zip_source_pkware_decode(), zip_source_pkware_encode(), zip_source_winzip_aes_decode(), and zip_source_winzip_aes_encode().
zip_source_t* zip_source_layered_create | ( | zip_source_t * | src, |
zip_source_layered_callback | cb, | ||
void * | ud, | ||
zip_error_t * | error | ||
) |
Definition at line 50 of file zip_source_layered.c.
References _zip_source_new(), cb, zip_source::cb, error(), zip_source::l, NULL, zip_source::src, src, zip_source::supports, zip_source::ud, zip_source_keep(), ZIP_SOURCE_SUPPORTS, and ZIP_SOURCE_SUPPORTS_READABLE.
Referenced by _zip_source_window_new(), zip_source_crc_create(), and zip_source_layered().
zip_source_t* zip_source_pkware_decode | ( | zip_t * | za, |
zip_source_t * | src, | ||
zip_uint16_t | em, | ||
int | flags, | ||
const char * | password | ||
) |
Definition at line 54 of file zip_source_pkware_decode.c.
References zip::error, flags, NULL, trad_pkware::password, pkware_decrypt(), s2, src, trad_pkware_free(), trad_pkware_new(), za, ZIP_CODEC_ENCODE, ZIP_EM_TRAD_PKWARE, ZIP_ER_ENCRNOTSUPP, ZIP_ER_INVAL, zip_error_set(), and zip_source_layered().
Referenced by _zip_get_encryption_implementation().
zip_source_t* zip_source_pkware_encode | ( | zip_t * | za, |
zip_source_t * | src, | ||
zip_uint16_t | em, | ||
int | flags, | ||
const char * | password | ||
) |
Definition at line 56 of file zip_source_pkware_encode.c.
References zip::error, flags, NULL, trad_pkware::password, pkware_encrypt(), s2, src, trad_pkware_free(), trad_pkware_new(), za, ZIP_CODEC_ENCODE, ZIP_EM_TRAD_PKWARE, ZIP_ER_ENCRNOTSUPP, ZIP_ER_INVAL, zip_error_set(), and zip_source_layered().
Referenced by _zip_get_encryption_implementation().
int zip_source_remove | ( | zip_source_t * | src | ) |
Definition at line 39 of file zip_source_remove.c.
References _zip_source_call(), NULL, src, zip_source_close(), ZIP_SOURCE_IS_OPEN_READING, ZIP_SOURCE_REMOVE, zip_source_rollback_write(), ZIP_SOURCE_WRITE_CLOSED, and ZIP_SOURCE_WRITE_REMOVED.
Referenced by zip_close().
zip_int64_t zip_source_supports | ( | zip_source_t * | src | ) |
Definition at line 41 of file zip_source_supports.c.
References src.
Referenced by _zip_source_window_new(), crc_read(), zip_close(), zip_file_is_seekable(), zip_open_from_source(), zip_source_accept_empty(), and zip_source_open().
zip_source_t* zip_source_winzip_aes_decode | ( | zip_t * | za, |
zip_source_t * | src, | ||
zip_uint16_t | encryption_method, | ||
int | flags, | ||
const char * | password | ||
) |
Definition at line 59 of file zip_source_winzip_aes_decode.c.
References _zip_error_set_from_source(), zip_stat::comp_size, winzip_aes::encryption_method, zip::error, flags, HMAC_LENGTH, NULL, winzip_aes::password, s2, SALT_LENGTH, src, zip_stat::valid, winzip_aes_decrypt(), winzip_aes_free(), winzip_aes_new(), WINZIP_AES_PASSWORD_VERIFY_LENGTH, za, ZIP_CODEC_ENCODE, ZIP_EM_AES_128, ZIP_EM_AES_192, ZIP_EM_AES_256, ZIP_ER_ENCRNOTSUPP, ZIP_ER_INVAL, ZIP_ER_OPNOTSUPP, zip_error_set(), zip_source_layered(), zip_source_stat(), and ZIP_STAT_COMP_SIZE.
Referenced by _zip_get_encryption_implementation().
zip_source_t* zip_source_winzip_aes_encode | ( | zip_t * | za, |
zip_source_t * | src, | ||
zip_uint16_t | encryption_method, | ||
int | flags, | ||
const char * | password | ||
) |
Definition at line 61 of file zip_source_winzip_aes_encode.c.
References winzip_aes::encryption_method, zip::error, NULL, winzip_aes::password, s2, src, winzip_aes_encrypt(), winzip_aes_free(), winzip_aes_new(), za, ZIP_EM_AES_128, ZIP_EM_AES_192, ZIP_EM_AES_256, ZIP_ER_INVAL, zip_error_set(), and zip_source_layered().
Referenced by _zip_get_encryption_implementation().
|
extern |
Definition at line 51 of file zip_err_str.c.
Referenced by zip_error_strerror().
Definition at line 76 of file zip_err_str.c.
Referenced by zip_error_strerror().
|
extern |
Definition at line 1 of file zip_err_str.c.
Referenced by zip_error_get_sys_type(), zip_error_strerror(), zip_error_system_type(), and zip_error_to_str().
Definition at line 51 of file zip_err_str.c.
Referenced by zip_error_get_sys_type(), zip_error_strerror(), zip_error_system_type(), and zip_error_to_str().
|
extern |
Definition at line 258 of file zip_algorithm_bzip2.c.
|
extern |
Definition at line 272 of file zip_algorithm_bzip2.c.
|
extern |
Definition at line 238 of file zip_algorithm_deflate.c.
|
extern |
Definition at line 252 of file zip_algorithm_deflate.c.
|
extern |
Definition at line 379 of file zip_algorithm_xz.c.
|
extern |
Definition at line 393 of file zip_algorithm_xz.c.
|
extern |
Definition at line 267 of file zip_algorithm_zstd.c.
|
extern |
Definition at line 281 of file zip_algorithm_zstd.c.