@appzung/react-native-code-push 8.3.2 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CodePush.podspec +3 -3
- package/README.md +3 -1
- package/android/app/build.gradle +2 -0
- package/android/app/src/main/AndroidManifest.xml +1 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +15 -8
- package/android/build.gradle +3 -0
- package/ios/CodePush/CodePush.m +2 -1
- package/ios/CodePush/SSZipArchive/Info.plist +26 -0
- package/ios/CodePush/SSZipArchive/README.md +1 -1
- package/ios/CodePush/SSZipArchive/SSZipArchive.h +129 -27
- package/ios/CodePush/SSZipArchive/SSZipArchive.m +1119 -314
- package/ios/CodePush/SSZipArchive/SSZipCommon.h +71 -0
- package/ios/CodePush/SSZipArchive/Supporting Files/PrivacyInfo.xcprivacy +23 -0
- package/ios/CodePush/SSZipArchive/include/ZipArchive.h +25 -0
- package/ios/CodePush/SSZipArchive/minizip/LICENSE +17 -0
- package/ios/CodePush/SSZipArchive/minizip/mz.h +273 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_compat.c +1306 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_compat.h +346 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt.c +187 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt.h +65 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt_apple.c +526 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_os.c +348 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_os.h +176 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_os_posix.c +350 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm.c +556 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm.h +132 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.c +383 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.h +42 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.c +269 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.h +48 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_os.h +40 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_os_posix.c +203 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.c +334 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.h +46 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.c +429 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.h +43 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.c +360 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.h +46 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.c +389 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.h +43 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_zip.c +2782 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_zip.h +262 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.c +1942 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.h +285 -0
- package/ios/CodePush.xcodeproj/project.pbxproj +245 -130
- package/ios/PrivacyInfo.xcprivacy +31 -0
- package/package.json +2 -2
- package/ios/CodePush/SSZipArchive/Common.h +0 -81
- package/ios/CodePush/SSZipArchive/aes/aes.h +0 -198
- package/ios/CodePush/SSZipArchive/aes/aes_via_ace.h +0 -541
- package/ios/CodePush/SSZipArchive/aes/aescrypt.c +0 -294
- package/ios/CodePush/SSZipArchive/aes/aeskey.c +0 -548
- package/ios/CodePush/SSZipArchive/aes/aesopt.h +0 -739
- package/ios/CodePush/SSZipArchive/aes/aestab.c +0 -391
- package/ios/CodePush/SSZipArchive/aes/aestab.h +0 -173
- package/ios/CodePush/SSZipArchive/aes/brg_endian.h +0 -126
- package/ios/CodePush/SSZipArchive/aes/brg_types.h +0 -219
- package/ios/CodePush/SSZipArchive/aes/entropy.c +0 -54
- package/ios/CodePush/SSZipArchive/aes/entropy.h +0 -16
- package/ios/CodePush/SSZipArchive/aes/fileenc.c +0 -144
- package/ios/CodePush/SSZipArchive/aes/fileenc.h +0 -121
- package/ios/CodePush/SSZipArchive/aes/hmac.c +0 -145
- package/ios/CodePush/SSZipArchive/aes/hmac.h +0 -103
- package/ios/CodePush/SSZipArchive/aes/prng.c +0 -155
- package/ios/CodePush/SSZipArchive/aes/prng.h +0 -82
- package/ios/CodePush/SSZipArchive/aes/pwd2key.c +0 -103
- package/ios/CodePush/SSZipArchive/aes/pwd2key.h +0 -57
- package/ios/CodePush/SSZipArchive/aes/sha1.c +0 -258
- package/ios/CodePush/SSZipArchive/aes/sha1.h +0 -73
- package/ios/CodePush/SSZipArchive/minizip/crypt.h +0 -130
- package/ios/CodePush/SSZipArchive/minizip/ioapi.c +0 -369
- package/ios/CodePush/SSZipArchive/minizip/ioapi.h +0 -175
- package/ios/CodePush/SSZipArchive/minizip/mztools.c +0 -284
- package/ios/CodePush/SSZipArchive/minizip/mztools.h +0 -31
- package/ios/CodePush/SSZipArchive/minizip/unzip.c +0 -1839
- package/ios/CodePush/SSZipArchive/minizip/unzip.h +0 -248
- package/ios/CodePush/SSZipArchive/minizip/zip.c +0 -1910
- package/ios/CodePush/SSZipArchive/minizip/zip.h +0 -202
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#ifndef SSZipCommon
|
|
2
|
+
#define SSZipCommon
|
|
3
|
+
|
|
4
|
+
// typedefs moved from mz_compat.h to here for public access
|
|
5
|
+
|
|
6
|
+
/* unz_global_info structure contain global data about the ZIPfile
|
|
7
|
+
These data comes from the end of central dir */
|
|
8
|
+
typedef struct unz_global_info64_s
|
|
9
|
+
{
|
|
10
|
+
uint64_t number_entry; /* total number of entries in the central dir on this disk */
|
|
11
|
+
uint32_t number_disk_with_CD; /* number the the disk with central dir, used for spanning ZIP */
|
|
12
|
+
uint16_t size_comment; /* size of the global comment of the zipfile */
|
|
13
|
+
} unz_global_info64;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
typedef struct unz_global_info_s
|
|
17
|
+
{
|
|
18
|
+
uint32_t number_entry; /* total number of entries in the central dir on this disk */
|
|
19
|
+
uint32_t number_disk_with_CD; /* number the the disk with central dir, used for spanning ZIP */
|
|
20
|
+
uint16_t size_comment; /* size of the global comment of the zipfile */
|
|
21
|
+
} unz_global_info;
|
|
22
|
+
|
|
23
|
+
/* unz_file_info contain information about a file in the zipfile */
|
|
24
|
+
/* https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT */
|
|
25
|
+
typedef struct unz_file_info64_s
|
|
26
|
+
{
|
|
27
|
+
uint16_t version; /* version made by 2 bytes */
|
|
28
|
+
uint16_t version_needed; /* version needed to extract 2 bytes */
|
|
29
|
+
uint16_t flag; /* general purpose bit flag 2 bytes */
|
|
30
|
+
uint16_t compression_method; /* compression method 2 bytes */
|
|
31
|
+
uint32_t dos_date; /* last mod file date in Dos fmt 4 bytes */
|
|
32
|
+
struct tm tmu_date;
|
|
33
|
+
uint32_t crc; /* crc-32 4 bytes */
|
|
34
|
+
uint64_t compressed_size; /* compressed size 8 bytes */
|
|
35
|
+
uint64_t uncompressed_size; /* uncompressed size 8 bytes */
|
|
36
|
+
uint16_t size_filename; /* filename length 2 bytes */
|
|
37
|
+
uint16_t size_file_extra; /* extra field length 2 bytes */
|
|
38
|
+
uint16_t size_file_comment; /* file comment length 2 bytes */
|
|
39
|
+
|
|
40
|
+
uint32_t disk_num_start; /* disk number start 4 bytes */
|
|
41
|
+
uint16_t internal_fa; /* internal file attributes 2 bytes */
|
|
42
|
+
uint32_t external_fa; /* external file attributes 4 bytes */
|
|
43
|
+
|
|
44
|
+
uint64_t disk_offset;
|
|
45
|
+
|
|
46
|
+
uint16_t size_file_extra_internal;
|
|
47
|
+
} unz_file_info64;
|
|
48
|
+
|
|
49
|
+
typedef struct unz_file_info_s
|
|
50
|
+
{
|
|
51
|
+
uint16_t version; /* version made by 2 bytes */
|
|
52
|
+
uint16_t version_needed; /* version needed to extract 2 bytes */
|
|
53
|
+
uint16_t flag; /* general purpose bit flag 2 bytes */
|
|
54
|
+
uint16_t compression_method; /* compression method 2 bytes */
|
|
55
|
+
uint32_t dos_date; /* last mod file date in Dos fmt 4 bytes */
|
|
56
|
+
struct tm tmu_date;
|
|
57
|
+
uint32_t crc; /* crc-32 4 bytes */
|
|
58
|
+
uint32_t compressed_size; /* compressed size 4 bytes */
|
|
59
|
+
uint32_t uncompressed_size; /* uncompressed size 4 bytes */
|
|
60
|
+
uint16_t size_filename; /* filename length 2 bytes */
|
|
61
|
+
uint16_t size_file_extra; /* extra field length 2 bytes */
|
|
62
|
+
uint16_t size_file_comment; /* file comment length 2 bytes */
|
|
63
|
+
|
|
64
|
+
uint16_t disk_num_start; /* disk number start 2 bytes */
|
|
65
|
+
uint16_t internal_fa; /* internal file attributes 2 bytes */
|
|
66
|
+
uint32_t external_fa; /* external file attributes 4 bytes */
|
|
67
|
+
|
|
68
|
+
uint64_t disk_offset;
|
|
69
|
+
} unz_file_info;
|
|
70
|
+
|
|
71
|
+
#endif
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>NSPrivacyTracking</key>
|
|
6
|
+
<false/>
|
|
7
|
+
<key>NSPrivacyCollectedDataTypes</key>
|
|
8
|
+
<array/>
|
|
9
|
+
<key>NSPrivacyTrackingDomains</key>
|
|
10
|
+
<array/>
|
|
11
|
+
<key>NSPrivacyAccessedAPITypes</key>
|
|
12
|
+
<array>
|
|
13
|
+
<dict>
|
|
14
|
+
<key>NSPrivacyAccessedAPIType</key>
|
|
15
|
+
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
|
16
|
+
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
17
|
+
<array>
|
|
18
|
+
<string>C617.1</string>
|
|
19
|
+
</array>
|
|
20
|
+
</dict>
|
|
21
|
+
</array>
|
|
22
|
+
</dict>
|
|
23
|
+
</plist>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ZipArchive.h
|
|
3
|
+
// ZipArchive
|
|
4
|
+
//
|
|
5
|
+
// Created by Serhii Mumriak on 12/1/15.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
//! Project version number for ZipArchive.
|
|
11
|
+
FOUNDATION_EXPORT double ZipArchiveVersionNumber;
|
|
12
|
+
|
|
13
|
+
//! Project version string for ZipArchive.
|
|
14
|
+
FOUNDATION_EXPORT const unsigned char ZipArchiveVersionString[];
|
|
15
|
+
|
|
16
|
+
// In this header, you should import all the public headers of your framework using statements like #import <SSZipArchive.h>
|
|
17
|
+
|
|
18
|
+
// This is to account for the many different ways this library gets imported.
|
|
19
|
+
#if __has_include(<SSZipArchive/SSZipArchive.h>)
|
|
20
|
+
#import <SSZipArchive/SSZipArchive.h>
|
|
21
|
+
#elif __has_include("../SSZipArchive.h")
|
|
22
|
+
#import "../SSZipArchive.h"
|
|
23
|
+
#else
|
|
24
|
+
#import "SSZipArchive.h"
|
|
25
|
+
#endif
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Condition of use and distribution are the same as zlib:
|
|
2
|
+
|
|
3
|
+
This software is provided 'as-is', without any express or implied
|
|
4
|
+
warranty. In no event will the authors be held liable for any damages
|
|
5
|
+
arising from the use of this software.
|
|
6
|
+
|
|
7
|
+
Permission is granted to anyone to use this software for any purpose,
|
|
8
|
+
including commercial applications, and to alter it and redistribute it
|
|
9
|
+
freely, subject to the following restrictions:
|
|
10
|
+
|
|
11
|
+
1. The origin of this software must not be misrepresented; you must not
|
|
12
|
+
claim that you wrote the original software. If you use this software
|
|
13
|
+
in a product, an acknowledgement in the product documentation would be
|
|
14
|
+
appreciated but is not required.
|
|
15
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
|
16
|
+
misrepresented as being the original software.
|
|
17
|
+
3. This notice may not be removed or altered from any source distribution.
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/* mz.h -- Errors codes, zip flags and magic
|
|
2
|
+
part of the minizip-ng project
|
|
3
|
+
|
|
4
|
+
Copyright (C) Nathan Moinvaziri
|
|
5
|
+
https://github.com/zlib-ng/minizip-ng
|
|
6
|
+
|
|
7
|
+
This program is distributed under the terms of the same license as zlib.
|
|
8
|
+
See the accompanying LICENSE file for the full text of the license.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#ifndef MZ_H
|
|
12
|
+
#define MZ_H
|
|
13
|
+
|
|
14
|
+
/***************************************************************************/
|
|
15
|
+
|
|
16
|
+
/* MZ_VERSION */
|
|
17
|
+
#define MZ_VERSION ("3.0.9")
|
|
18
|
+
#define MZ_VERSION_BUILD (030009)
|
|
19
|
+
|
|
20
|
+
/* MZ_ERROR */
|
|
21
|
+
#define MZ_OK (0) /* zlib */
|
|
22
|
+
#define MZ_STREAM_ERROR (-1) /* zlib */
|
|
23
|
+
#define MZ_DATA_ERROR (-3) /* zlib */
|
|
24
|
+
#define MZ_MEM_ERROR (-4) /* zlib */
|
|
25
|
+
#define MZ_BUF_ERROR (-5) /* zlib */
|
|
26
|
+
#define MZ_VERSION_ERROR (-6) /* zlib */
|
|
27
|
+
|
|
28
|
+
#define MZ_END_OF_LIST (-100)
|
|
29
|
+
#define MZ_END_OF_STREAM (-101)
|
|
30
|
+
|
|
31
|
+
#define MZ_PARAM_ERROR (-102)
|
|
32
|
+
#define MZ_FORMAT_ERROR (-103)
|
|
33
|
+
#define MZ_INTERNAL_ERROR (-104)
|
|
34
|
+
#define MZ_CRC_ERROR (-105)
|
|
35
|
+
#define MZ_CRYPT_ERROR (-106)
|
|
36
|
+
#define MZ_EXIST_ERROR (-107)
|
|
37
|
+
#define MZ_PASSWORD_ERROR (-108)
|
|
38
|
+
#define MZ_SUPPORT_ERROR (-109)
|
|
39
|
+
#define MZ_HASH_ERROR (-110)
|
|
40
|
+
#define MZ_OPEN_ERROR (-111)
|
|
41
|
+
#define MZ_CLOSE_ERROR (-112)
|
|
42
|
+
#define MZ_SEEK_ERROR (-113)
|
|
43
|
+
#define MZ_TELL_ERROR (-114)
|
|
44
|
+
#define MZ_READ_ERROR (-115)
|
|
45
|
+
#define MZ_WRITE_ERROR (-116)
|
|
46
|
+
#define MZ_SIGN_ERROR (-117)
|
|
47
|
+
#define MZ_SYMLINK_ERROR (-118)
|
|
48
|
+
|
|
49
|
+
/* MZ_OPEN */
|
|
50
|
+
#define MZ_OPEN_MODE_READ (0x01)
|
|
51
|
+
#define MZ_OPEN_MODE_WRITE (0x02)
|
|
52
|
+
#define MZ_OPEN_MODE_READWRITE (MZ_OPEN_MODE_READ | MZ_OPEN_MODE_WRITE)
|
|
53
|
+
#define MZ_OPEN_MODE_APPEND (0x04)
|
|
54
|
+
#define MZ_OPEN_MODE_CREATE (0x08)
|
|
55
|
+
#define MZ_OPEN_MODE_EXISTING (0x10)
|
|
56
|
+
|
|
57
|
+
/* MZ_SEEK */
|
|
58
|
+
#define MZ_SEEK_SET (0)
|
|
59
|
+
#define MZ_SEEK_CUR (1)
|
|
60
|
+
#define MZ_SEEK_END (2)
|
|
61
|
+
|
|
62
|
+
/* MZ_COMPRESS */
|
|
63
|
+
#define MZ_COMPRESS_METHOD_STORE (0)
|
|
64
|
+
#define MZ_COMPRESS_METHOD_DEFLATE (8)
|
|
65
|
+
#define MZ_COMPRESS_METHOD_BZIP2 (12)
|
|
66
|
+
#define MZ_COMPRESS_METHOD_LZMA (14)
|
|
67
|
+
#define MZ_COMPRESS_METHOD_ZSTD (93)
|
|
68
|
+
#define MZ_COMPRESS_METHOD_XZ (95)
|
|
69
|
+
#define MZ_COMPRESS_METHOD_AES (99)
|
|
70
|
+
|
|
71
|
+
#define MZ_COMPRESS_LEVEL_DEFAULT (-1)
|
|
72
|
+
#define MZ_COMPRESS_LEVEL_FAST (2)
|
|
73
|
+
#define MZ_COMPRESS_LEVEL_NORMAL (6)
|
|
74
|
+
#define MZ_COMPRESS_LEVEL_BEST (9)
|
|
75
|
+
|
|
76
|
+
/* MZ_ZIP_FLAG */
|
|
77
|
+
#define MZ_ZIP_FLAG_ENCRYPTED (1 << 0)
|
|
78
|
+
#define MZ_ZIP_FLAG_LZMA_EOS_MARKER (1 << 1)
|
|
79
|
+
#define MZ_ZIP_FLAG_DEFLATE_MAX (1 << 1)
|
|
80
|
+
#define MZ_ZIP_FLAG_DEFLATE_NORMAL (0)
|
|
81
|
+
#define MZ_ZIP_FLAG_DEFLATE_FAST (1 << 2)
|
|
82
|
+
#define MZ_ZIP_FLAG_DEFLATE_SUPER_FAST (MZ_ZIP_FLAG_DEFLATE_FAST | \
|
|
83
|
+
MZ_ZIP_FLAG_DEFLATE_MAX)
|
|
84
|
+
#define MZ_ZIP_FLAG_DATA_DESCRIPTOR (1 << 3)
|
|
85
|
+
#define MZ_ZIP_FLAG_UTF8 (1 << 11)
|
|
86
|
+
#define MZ_ZIP_FLAG_MASK_LOCAL_INFO (1 << 13)
|
|
87
|
+
|
|
88
|
+
/* MZ_ZIP_EXTENSION */
|
|
89
|
+
#define MZ_ZIP_EXTENSION_ZIP64 (0x0001)
|
|
90
|
+
#define MZ_ZIP_EXTENSION_NTFS (0x000a)
|
|
91
|
+
#define MZ_ZIP_EXTENSION_AES (0x9901)
|
|
92
|
+
#define MZ_ZIP_EXTENSION_UNIX1 (0x000d)
|
|
93
|
+
#define MZ_ZIP_EXTENSION_SIGN (0x10c5)
|
|
94
|
+
#define MZ_ZIP_EXTENSION_HASH (0x1a51)
|
|
95
|
+
#define MZ_ZIP_EXTENSION_CDCD (0xcdcd)
|
|
96
|
+
|
|
97
|
+
/* MZ_ZIP64 */
|
|
98
|
+
#define MZ_ZIP64_AUTO (0)
|
|
99
|
+
#define MZ_ZIP64_FORCE (1)
|
|
100
|
+
#define MZ_ZIP64_DISABLE (2)
|
|
101
|
+
|
|
102
|
+
/* MZ_HOST_SYSTEM */
|
|
103
|
+
#define MZ_HOST_SYSTEM(VERSION_MADEBY) ((uint8_t)(VERSION_MADEBY >> 8))
|
|
104
|
+
#define MZ_HOST_SYSTEM_MSDOS (0)
|
|
105
|
+
#define MZ_HOST_SYSTEM_UNIX (3)
|
|
106
|
+
#define MZ_HOST_SYSTEM_WINDOWS_NTFS (10)
|
|
107
|
+
#define MZ_HOST_SYSTEM_RISCOS (13)
|
|
108
|
+
#define MZ_HOST_SYSTEM_OSX_DARWIN (19)
|
|
109
|
+
|
|
110
|
+
/* MZ_PKCRYPT */
|
|
111
|
+
#define MZ_PKCRYPT_HEADER_SIZE (12)
|
|
112
|
+
|
|
113
|
+
/* MZ_AES */
|
|
114
|
+
#define MZ_AES_VERSION (1)
|
|
115
|
+
#define MZ_AES_ENCRYPTION_MODE_128 (0x01)
|
|
116
|
+
#define MZ_AES_ENCRYPTION_MODE_192 (0x02)
|
|
117
|
+
#define MZ_AES_ENCRYPTION_MODE_256 (0x03)
|
|
118
|
+
#define MZ_AES_KEY_LENGTH(MODE) (8 * (MODE & 3) + 8)
|
|
119
|
+
#define MZ_AES_KEY_LENGTH_MAX (32)
|
|
120
|
+
#define MZ_AES_BLOCK_SIZE (16)
|
|
121
|
+
#define MZ_AES_HEADER_SIZE(MODE) ((4 * (MODE & 3) + 4) + 2)
|
|
122
|
+
#define MZ_AES_FOOTER_SIZE (10)
|
|
123
|
+
|
|
124
|
+
/* MZ_HASH */
|
|
125
|
+
#define MZ_HASH_MD5 (10)
|
|
126
|
+
#define MZ_HASH_MD5_SIZE (16)
|
|
127
|
+
#define MZ_HASH_SHA1 (20)
|
|
128
|
+
#define MZ_HASH_SHA1_SIZE (20)
|
|
129
|
+
#define MZ_HASH_SHA224 (22)
|
|
130
|
+
#define MZ_HASH_SHA224_SIZE (28)
|
|
131
|
+
#define MZ_HASH_SHA256 (23)
|
|
132
|
+
#define MZ_HASH_SHA256_SIZE (32)
|
|
133
|
+
#define MZ_HASH_SHA384 (24)
|
|
134
|
+
#define MZ_HASH_SHA384_SIZE (48)
|
|
135
|
+
#define MZ_HASH_SHA512 (25)
|
|
136
|
+
#define MZ_HASH_SHA512_SIZE (64)
|
|
137
|
+
#define MZ_HASH_MAX_SIZE (256)
|
|
138
|
+
|
|
139
|
+
/* MZ_ENCODING */
|
|
140
|
+
#define MZ_ENCODING_CODEPAGE_437 (437)
|
|
141
|
+
#define MZ_ENCODING_CODEPAGE_932 (932)
|
|
142
|
+
#define MZ_ENCODING_CODEPAGE_936 (936)
|
|
143
|
+
#define MZ_ENCODING_CODEPAGE_950 (950)
|
|
144
|
+
#define MZ_ENCODING_UTF8 (65001)
|
|
145
|
+
|
|
146
|
+
/* MZ_UTILITY */
|
|
147
|
+
#define MZ_UNUSED(SYMBOL) ((void)SYMBOL)
|
|
148
|
+
|
|
149
|
+
#if defined(_WIN32) && defined(MZ_EXPORTS)
|
|
150
|
+
#define MZ_EXPORT __declspec(dllexport)
|
|
151
|
+
#else
|
|
152
|
+
#define MZ_EXPORT
|
|
153
|
+
#endif
|
|
154
|
+
|
|
155
|
+
/***************************************************************************/
|
|
156
|
+
|
|
157
|
+
#include <stdlib.h> /* size_t, NULL, malloc */
|
|
158
|
+
#include <time.h> /* time_t, time() */
|
|
159
|
+
#include <string.h> /* memset, strncpy, strlen */
|
|
160
|
+
#include <limits.h>
|
|
161
|
+
|
|
162
|
+
#if defined(HAVE_STDINT_H)
|
|
163
|
+
# include <stdint.h>
|
|
164
|
+
#elif defined(__has_include)
|
|
165
|
+
# if __has_include(<stdint.h>)
|
|
166
|
+
# include <stdint.h>
|
|
167
|
+
# endif
|
|
168
|
+
#endif
|
|
169
|
+
|
|
170
|
+
#ifndef INT8_MAX
|
|
171
|
+
typedef signed char int8_t;
|
|
172
|
+
#endif
|
|
173
|
+
#ifndef INT16_MAX
|
|
174
|
+
typedef short int16_t;
|
|
175
|
+
#endif
|
|
176
|
+
#ifndef INT32_MAX
|
|
177
|
+
typedef int int32_t;
|
|
178
|
+
#endif
|
|
179
|
+
#ifndef INT64_MAX
|
|
180
|
+
typedef long long int64_t;
|
|
181
|
+
#endif
|
|
182
|
+
#ifndef UINT8_MAX
|
|
183
|
+
typedef unsigned char uint8_t;
|
|
184
|
+
#endif
|
|
185
|
+
#ifndef UINT16_MAX
|
|
186
|
+
typedef unsigned short uint16_t;
|
|
187
|
+
#endif
|
|
188
|
+
#ifndef UINT32_MAX
|
|
189
|
+
typedef unsigned int uint32_t;
|
|
190
|
+
#endif
|
|
191
|
+
#ifndef UINT64_MAX
|
|
192
|
+
typedef unsigned long long uint64_t;
|
|
193
|
+
#endif
|
|
194
|
+
|
|
195
|
+
#if defined(HAVE_INTTYPES_H)
|
|
196
|
+
# include <inttypes.h>
|
|
197
|
+
#elif defined(__has_include)
|
|
198
|
+
# if __has_include(<inttypes.h>)
|
|
199
|
+
# include <inttypes.h>
|
|
200
|
+
# endif
|
|
201
|
+
#endif
|
|
202
|
+
|
|
203
|
+
#ifndef PRId8
|
|
204
|
+
# define PRId8 "hhd"
|
|
205
|
+
#endif
|
|
206
|
+
#ifndef PRIu8
|
|
207
|
+
# define PRIu8 "hhu"
|
|
208
|
+
#endif
|
|
209
|
+
#ifndef PRIx8
|
|
210
|
+
# define PRIx8 "hhx"
|
|
211
|
+
#endif
|
|
212
|
+
#ifndef PRId16
|
|
213
|
+
# define PRId16 "hd"
|
|
214
|
+
#endif
|
|
215
|
+
#ifndef PRIu16
|
|
216
|
+
# define PRIu16 "hu"
|
|
217
|
+
#endif
|
|
218
|
+
#ifndef PRIx16
|
|
219
|
+
# define PRIx16 "hx"
|
|
220
|
+
#endif
|
|
221
|
+
#ifndef PRId32
|
|
222
|
+
# define PRId32 "d"
|
|
223
|
+
#endif
|
|
224
|
+
#ifndef PRIu32
|
|
225
|
+
# define PRIu32 "u"
|
|
226
|
+
#endif
|
|
227
|
+
#ifndef PRIx32
|
|
228
|
+
# define PRIx32 "x"
|
|
229
|
+
#endif
|
|
230
|
+
#if ULONG_MAX == 0xfffffffful
|
|
231
|
+
# ifndef PRId64
|
|
232
|
+
# define PRId64 "ld"
|
|
233
|
+
# endif
|
|
234
|
+
# ifndef PRIu64
|
|
235
|
+
# define PRIu64 "lu"
|
|
236
|
+
# endif
|
|
237
|
+
# ifndef PRIx64
|
|
238
|
+
# define PRIx64 "lx"
|
|
239
|
+
# endif
|
|
240
|
+
#else
|
|
241
|
+
# ifndef PRId64
|
|
242
|
+
# define PRId64 "lld"
|
|
243
|
+
# endif
|
|
244
|
+
# ifndef PRIu64
|
|
245
|
+
# define PRIu64 "llu"
|
|
246
|
+
# endif
|
|
247
|
+
# ifndef PRIx64
|
|
248
|
+
# define PRIx64 "llx"
|
|
249
|
+
# endif
|
|
250
|
+
#endif
|
|
251
|
+
|
|
252
|
+
#ifndef INT16_MAX
|
|
253
|
+
# define INT16_MAX 32767
|
|
254
|
+
#endif
|
|
255
|
+
#ifndef INT32_MAX
|
|
256
|
+
# define INT32_MAX 2147483647L
|
|
257
|
+
#endif
|
|
258
|
+
#ifndef INT64_MAX
|
|
259
|
+
# define INT64_MAX 9223372036854775807LL
|
|
260
|
+
#endif
|
|
261
|
+
#ifndef UINT16_MAX
|
|
262
|
+
# define UINT16_MAX 65535U
|
|
263
|
+
#endif
|
|
264
|
+
#ifndef UINT32_MAX
|
|
265
|
+
# define UINT32_MAX 4294967295UL
|
|
266
|
+
#endif
|
|
267
|
+
#ifndef UINT64_MAX
|
|
268
|
+
# define UINT64_MAX 18446744073709551615ULL
|
|
269
|
+
#endif
|
|
270
|
+
|
|
271
|
+
/***************************************************************************/
|
|
272
|
+
|
|
273
|
+
#endif
|