react-native-mmkv-dz 2.5.1

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.
Files changed (138) hide show
  1. package/LICENSE +219 -0
  2. package/MMKV/CHANGELOG.md +553 -0
  3. package/MMKV/Core/CMakeLists.txt +153 -0
  4. package/MMKV/Core/CodedInputData.cpp +228 -0
  5. package/MMKV/Core/CodedInputData.h +83 -0
  6. package/MMKV/Core/CodedInputDataCrypt.cpp +280 -0
  7. package/MMKV/Core/CodedInputDataCrypt.h +87 -0
  8. package/MMKV/Core/CodedInputDataCrypt_OSX.cpp +62 -0
  9. package/MMKV/Core/CodedInputData_OSX.cpp +92 -0
  10. package/MMKV/Core/CodedOutputData.cpp +174 -0
  11. package/MMKV/Core/CodedOutputData.h +82 -0
  12. package/MMKV/Core/Core.xcodeproj/project.pbxproj +702 -0
  13. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  14. package/MMKV/Core/Core.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  15. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/Core.xcscheme +67 -0
  16. package/MMKV/Core/Core.xcodeproj/xcshareddata/xcschemes/MMKVWatchCore.xcscheme +67 -0
  17. package/MMKV/Core/InterProcessLock.cpp +186 -0
  18. package/MMKV/Core/InterProcessLock.h +119 -0
  19. package/MMKV/Core/InterProcessLock_Android.cpp +103 -0
  20. package/MMKV/Core/InterProcessLock_Win32.cpp +108 -0
  21. package/MMKV/Core/KeyValueHolder.cpp +236 -0
  22. package/MMKV/Core/KeyValueHolder.h +118 -0
  23. package/MMKV/Core/MMBuffer.cpp +185 -0
  24. package/MMKV/Core/MMBuffer.h +107 -0
  25. package/MMKV/Core/MMKV.cpp +1418 -0
  26. package/MMKV/Core/MMKV.h +386 -0
  27. package/MMKV/Core/MMKVLog.cpp +127 -0
  28. package/MMKV/Core/MMKVLog.h +86 -0
  29. package/MMKV/Core/MMKVLog_Android.cpp +79 -0
  30. package/MMKV/Core/MMKVMetaInfo.hpp +81 -0
  31. package/MMKV/Core/MMKVPredef.h +245 -0
  32. package/MMKV/Core/MMKV_Android.cpp +259 -0
  33. package/MMKV/Core/MMKV_IO.cpp +1119 -0
  34. package/MMKV/Core/MMKV_IO.h +57 -0
  35. package/MMKV/Core/MMKV_OSX.cpp +347 -0
  36. package/MMKV/Core/MMKV_OSX.h +51 -0
  37. package/MMKV/Core/MemoryFile.cpp +537 -0
  38. package/MMKV/Core/MemoryFile.h +182 -0
  39. package/MMKV/Core/MemoryFile_Android.cpp +211 -0
  40. package/MMKV/Core/MemoryFile_Linux.cpp +120 -0
  41. package/MMKV/Core/MemoryFile_OSX.cpp +142 -0
  42. package/MMKV/Core/MemoryFile_Win32.cpp +536 -0
  43. package/MMKV/Core/MiniPBCoder.cpp +366 -0
  44. package/MMKV/Core/MiniPBCoder.h +129 -0
  45. package/MMKV/Core/MiniPBCoder_OSX.cpp +228 -0
  46. package/MMKV/Core/PBEncodeItem.hpp +86 -0
  47. package/MMKV/Core/PBUtility.cpp +61 -0
  48. package/MMKV/Core/PBUtility.h +153 -0
  49. package/MMKV/Core/ScopedLock.hpp +69 -0
  50. package/MMKV/Core/ThreadLock.cpp +68 -0
  51. package/MMKV/Core/ThreadLock.h +78 -0
  52. package/MMKV/Core/ThreadLock_Win32.cpp +89 -0
  53. package/MMKV/Core/aes/AESCrypt.cpp +256 -0
  54. package/MMKV/Core/aes/AESCrypt.h +107 -0
  55. package/MMKV/Core/aes/openssl/openssl_aes-armv4.S +1231 -0
  56. package/MMKV/Core/aes/openssl/openssl_aes.h +118 -0
  57. package/MMKV/Core/aes/openssl/openssl_aes_core.cpp +1044 -0
  58. package/MMKV/Core/aes/openssl/openssl_aes_locl.h +38 -0
  59. package/MMKV/Core/aes/openssl/openssl_aesv8-armx.S +308 -0
  60. package/MMKV/Core/aes/openssl/openssl_arm_arch.h +84 -0
  61. package/MMKV/Core/aes/openssl/openssl_cfb128.cpp +97 -0
  62. package/MMKV/Core/aes/openssl/openssl_md32_common.h +254 -0
  63. package/MMKV/Core/aes/openssl/openssl_md5.h +49 -0
  64. package/MMKV/Core/aes/openssl/openssl_md5_dgst.cpp +166 -0
  65. package/MMKV/Core/aes/openssl/openssl_md5_locl.h +75 -0
  66. package/MMKV/Core/aes/openssl/openssl_md5_one.cpp +30 -0
  67. package/MMKV/Core/aes/openssl/openssl_opensslconf.h +271 -0
  68. package/MMKV/Core/core.vcxproj +186 -0
  69. package/MMKV/Core/core.vcxproj.filters +150 -0
  70. package/MMKV/Core/crc32/Checksum.h +67 -0
  71. package/MMKV/Core/crc32/crc32_armv8.cpp +132 -0
  72. package/MMKV/Core/crc32/zlib/crc32.cpp +55 -0
  73. package/MMKV/Core/crc32/zlib/crc32.h +48 -0
  74. package/MMKV/Core/crc32/zlib/zconf.h +380 -0
  75. package/MMKV/Core/crc32/zlib/zutil.h +25 -0
  76. package/MMKV/LICENSE.TXT +193 -0
  77. package/MMKV/README.md +288 -0
  78. package/README.md +221 -0
  79. package/android/CMakeLists.txt +71 -0
  80. package/android/build.gradle +371 -0
  81. package/android/gradle.properties +4 -0
  82. package/android/src/main/AndroidManifest.xml +4 -0
  83. package/android/src/main/cpp/MmkvHostObject.cpp +302 -0
  84. package/android/src/main/cpp/MmkvHostObject.h +26 -0
  85. package/android/src/main/cpp/cpp-adapter.cpp +65 -0
  86. package/android/src/main/java/com/reactnativemmkv/MmkvModule.java +49 -0
  87. package/android/src/main/java/com/reactnativemmkv/MmkvPackage.java +26 -0
  88. package/cpp/TypedArray.cpp +341 -0
  89. package/cpp/TypedArray.h +175 -0
  90. package/ios/JSIUtils.h +50 -0
  91. package/ios/JSIUtils.mm +194 -0
  92. package/ios/Mmkv.xcodeproj/project.pbxproj +291 -0
  93. package/ios/MmkvHostObject.h +27 -0
  94. package/ios/MmkvHostObject.mm +299 -0
  95. package/ios/MmkvModule.h +5 -0
  96. package/ios/MmkvModule.mm +73 -0
  97. package/lib/commonjs/MMKV.js +146 -0
  98. package/lib/commonjs/MMKV.js.map +1 -0
  99. package/lib/commonjs/PlatformChecker.js +16 -0
  100. package/lib/commonjs/PlatformChecker.js.map +1 -0
  101. package/lib/commonjs/createMMKV.js +66 -0
  102. package/lib/commonjs/createMMKV.js.map +1 -0
  103. package/lib/commonjs/createMMKV.mock.js +40 -0
  104. package/lib/commonjs/createMMKV.mock.js.map +1 -0
  105. package/lib/commonjs/createMMKV.web.js +77 -0
  106. package/lib/commonjs/createMMKV.web.js.map +1 -0
  107. package/lib/commonjs/createTextEncoder.js +24 -0
  108. package/lib/commonjs/createTextEncoder.js.map +1 -0
  109. package/lib/commonjs/hooks.js +200 -0
  110. package/lib/commonjs/hooks.js.map +1 -0
  111. package/lib/commonjs/index.js +32 -0
  112. package/lib/commonjs/index.js.map +1 -0
  113. package/lib/module/MMKV.js +134 -0
  114. package/lib/module/MMKV.js.map +1 -0
  115. package/lib/module/PlatformChecker.js +9 -0
  116. package/lib/module/PlatformChecker.js.map +1 -0
  117. package/lib/module/createMMKV.js +55 -0
  118. package/lib/module/createMMKV.js.map +1 -0
  119. package/lib/module/createMMKV.mock.js +31 -0
  120. package/lib/module/createMMKV.mock.js.map +1 -0
  121. package/lib/module/createMMKV.web.js +67 -0
  122. package/lib/module/createMMKV.web.js.map +1 -0
  123. package/lib/module/createTextEncoder.js +17 -0
  124. package/lib/module/createTextEncoder.js.map +1 -0
  125. package/lib/module/hooks.js +181 -0
  126. package/lib/module/hooks.js.map +1 -0
  127. package/lib/module/index.js +3 -0
  128. package/lib/module/index.js.map +1 -0
  129. package/lib/typescript/MMKV.d.ts +137 -0
  130. package/lib/typescript/PlatformChecker.d.ts +1 -0
  131. package/lib/typescript/createMMKV.d.ts +6 -0
  132. package/lib/typescript/createMMKV.mock.d.ts +2 -0
  133. package/lib/typescript/createMMKV.web.d.ts +2 -0
  134. package/lib/typescript/createTextEncoder.d.ts +1 -0
  135. package/lib/typescript/hooks.d.ts +81 -0
  136. package/lib/typescript/index.d.ts +2 -0
  137. package/package.json +168 -0
  138. package/react-native-mmkv.podspec +32 -0
@@ -0,0 +1,271 @@
1
+ /* opensslconf.h */
2
+ /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+ /* OpenSSL was configured with the following options: */
8
+ #ifndef OPENSSL_SYSNAME_iOS
9
+ # define OPENSSL_SYSNAME_iOS
10
+ #endif
11
+ #ifndef OPENSSL_DOING_MAKEDEPEND
12
+
13
+
14
+ #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
15
+ # define OPENSSL_NO_EC_NISTP_64_GCC_128
16
+ #endif
17
+ #ifndef OPENSSL_NO_GMP
18
+ # define OPENSSL_NO_GMP
19
+ #endif
20
+ #ifndef OPENSSL_NO_JPAKE
21
+ # define OPENSSL_NO_JPAKE
22
+ #endif
23
+ #ifndef OPENSSL_NO_KRB5
24
+ # define OPENSSL_NO_KRB5
25
+ #endif
26
+ #ifndef OPENSSL_NO_LIBUNBOUND
27
+ # define OPENSSL_NO_LIBUNBOUND
28
+ #endif
29
+ #ifndef OPENSSL_NO_MD2
30
+ # define OPENSSL_NO_MD2
31
+ #endif
32
+ #ifndef OPENSSL_NO_RC5
33
+ # define OPENSSL_NO_RC5
34
+ #endif
35
+ #ifndef OPENSSL_NO_RFC3779
36
+ # define OPENSSL_NO_RFC3779
37
+ #endif
38
+ #ifndef OPENSSL_NO_SCTP
39
+ # define OPENSSL_NO_SCTP
40
+ #endif
41
+ #ifndef OPENSSL_NO_SSL_TRACE
42
+ # define OPENSSL_NO_SSL_TRACE
43
+ #endif
44
+ #ifndef OPENSSL_NO_SSL2
45
+ # define OPENSSL_NO_SSL2
46
+ #endif
47
+ #ifndef OPENSSL_NO_STORE
48
+ # define OPENSSL_NO_STORE
49
+ #endif
50
+ #ifndef OPENSSL_NO_UNIT_TEST
51
+ # define OPENSSL_NO_UNIT_TEST
52
+ #endif
53
+ #ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
54
+ # define OPENSSL_NO_WEAK_SSL_CIPHERS
55
+ #endif
56
+
57
+ #endif /* OPENSSL_DOING_MAKEDEPEND */
58
+
59
+ #ifndef OPENSSL_THREADS
60
+ # define OPENSSL_THREADS
61
+ #endif
62
+ #ifndef OPENSSL_NO_DYNAMIC_ENGINE
63
+ # define OPENSSL_NO_DYNAMIC_ENGINE
64
+ #endif
65
+
66
+ /* The OPENSSL_NO_* macros are also defined as NO_* if the application
67
+ asks for it. This is a transient feature that is provided for those
68
+ who haven't had the time to do the appropriate changes in their
69
+ applications. */
70
+ #ifdef OPENSSL_ALGORITHM_DEFINES
71
+ # if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128)
72
+ # define NO_EC_NISTP_64_GCC_128
73
+ # endif
74
+ # if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
75
+ # define NO_GMP
76
+ # endif
77
+ # if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE)
78
+ # define NO_JPAKE
79
+ # endif
80
+ # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
81
+ # define NO_KRB5
82
+ # endif
83
+ # if defined(OPENSSL_NO_LIBUNBOUND) && !defined(NO_LIBUNBOUND)
84
+ # define NO_LIBUNBOUND
85
+ # endif
86
+ # if defined(OPENSSL_NO_MD2) && !defined(NO_MD2)
87
+ # define NO_MD2
88
+ # endif
89
+ # if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)
90
+ # define NO_RC5
91
+ # endif
92
+ # if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779)
93
+ # define NO_RFC3779
94
+ # endif
95
+ # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP)
96
+ # define NO_SCTP
97
+ # endif
98
+ # if defined(OPENSSL_NO_SSL_TRACE) && !defined(NO_SSL_TRACE)
99
+ # define NO_SSL_TRACE
100
+ # endif
101
+ # if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2)
102
+ # define NO_SSL2
103
+ # endif
104
+ # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)
105
+ # define NO_STORE
106
+ # endif
107
+ # if defined(OPENSSL_NO_UNIT_TEST) && !defined(NO_UNIT_TEST)
108
+ # define NO_UNIT_TEST
109
+ # endif
110
+ # if defined(OPENSSL_NO_WEAK_SSL_CIPHERS) && !defined(NO_WEAK_SSL_CIPHERS)
111
+ # define NO_WEAK_SSL_CIPHERS
112
+ # endif
113
+ #endif
114
+
115
+ /* crypto/opensslconf.h.in */
116
+
117
+ /* Generate 80386 code? */
118
+ #undef I386_ONLY
119
+
120
+ #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
121
+ #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
122
+ #define ENGINESDIR "/Users/elviswu/Desktop/compile/openssl-ios-build-shell-script-master/openssl-1.0.2k-build/armv7/lib/engines"
123
+ #define OPENSSLDIR "/Users/elviswu/Desktop/compile/openssl-ios-build-shell-script-master/openssl-1.0.2k-build/armv7/ssl"
124
+ #endif
125
+ #endif
126
+
127
+ #undef OPENSSL_UNISTD
128
+ #define OPENSSL_UNISTD <unistd.h>
129
+
130
+ #undef OPENSSL_EXPORT_VAR_AS_FUNCTION
131
+
132
+ #if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
133
+ #define IDEA_INT unsigned int
134
+ #endif
135
+
136
+ #if defined(HEADER_MD2_H) && !defined(MD2_INT)
137
+ #define MD2_INT unsigned int
138
+ #endif
139
+
140
+ #if defined(HEADER_RC2_H) && !defined(RC2_INT)
141
+ /* I need to put in a mod for the alpha - eay */
142
+ #define RC2_INT unsigned int
143
+ #endif
144
+
145
+ #if defined(HEADER_RC4_H)
146
+ #if !defined(RC4_INT)
147
+ /* using int types make the structure larger but make the code faster
148
+ * on most boxes I have tested - up to %20 faster. */
149
+ /*
150
+ * I don't know what does "most" mean, but declaring "int" is a must on:
151
+ * - Intel P6 because partial register stalls are very expensive;
152
+ * - elder Alpha because it lacks byte load/store instructions;
153
+ */
154
+ #define RC4_INT unsigned char
155
+ #endif
156
+ #if !defined(RC4_CHUNK)
157
+ /*
158
+ * This enables code handling data aligned at natural CPU word
159
+ * boundary. See crypto/rc4/rc4_enc.c for further details.
160
+ */
161
+ #define RC4_CHUNK unsigned long
162
+ #endif
163
+ #endif
164
+
165
+ #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
166
+ /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
167
+ * %20 speed up (longs are 8 bytes, int's are 4). */
168
+ #ifndef DES_LONG
169
+ #define DES_LONG unsigned long
170
+ #endif
171
+ #endif
172
+
173
+ #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
174
+ #define CONFIG_HEADER_BN_H
175
+ #define BN_LLONG
176
+
177
+ /* Should we define BN_DIV2W here? */
178
+
179
+ /* Only one for the following should be defined */
180
+ #undef SIXTY_FOUR_BIT_LONG
181
+ #undef SIXTY_FOUR_BIT
182
+ #define THIRTY_TWO_BIT
183
+ #endif
184
+
185
+ #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
186
+ #define CONFIG_HEADER_RC4_LOCL_H
187
+ /* if this is defined data[i] is used instead of *data, this is a %20
188
+ * speedup on x86 */
189
+ #undef RC4_INDEX
190
+ #endif
191
+
192
+ #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
193
+ #define CONFIG_HEADER_BF_LOCL_H
194
+ #define BF_PTR
195
+ #endif /* HEADER_BF_LOCL_H */
196
+
197
+ #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
198
+ #define CONFIG_HEADER_DES_LOCL_H
199
+ #ifndef DES_DEFAULT_OPTIONS
200
+ /* the following is tweaked from a config script, that is why it is a
201
+ * protected undef/define */
202
+ #ifndef DES_PTR
203
+ #undef DES_PTR
204
+ #endif
205
+
206
+ /* This helps C compiler generate the correct code for multiple functional
207
+ * units. It reduces register dependancies at the expense of 2 more
208
+ * registers */
209
+ #ifndef DES_RISC1
210
+ #undef DES_RISC1
211
+ #endif
212
+
213
+ #ifndef DES_RISC2
214
+ #undef DES_RISC2
215
+ #endif
216
+
217
+ #if defined(DES_RISC1) && defined(DES_RISC2)
218
+ #error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
219
+ #endif
220
+
221
+ /* Unroll the inner loop, this sometimes helps, sometimes hinders.
222
+ * Very mucy CPU dependant */
223
+ #ifndef DES_UNROLL
224
+ #define DES_UNROLL
225
+ #endif
226
+
227
+ /* These default values were supplied by
228
+ * Peter Gutman <pgut001@cs.auckland.ac.nz>
229
+ * They are only used if nothing else has been defined */
230
+ #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
231
+ /* Special defines which change the way the code is built depending on the
232
+ CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
233
+ even newer MIPS CPU's, but at the moment one size fits all for
234
+ optimization options. Older Sparc's work better with only UNROLL, but
235
+ there's no way to tell at compile time what it is you're running on */
236
+
237
+ #if defined( __sun ) || defined ( sun ) /* Newer Sparc's */
238
+ # define DES_PTR
239
+ # define DES_RISC1
240
+ # define DES_UNROLL
241
+ #elif defined( __ultrix ) /* Older MIPS */
242
+ # define DES_PTR
243
+ # define DES_RISC2
244
+ # define DES_UNROLL
245
+ #elif defined( __osf1__ ) /* Alpha */
246
+ # define DES_PTR
247
+ # define DES_RISC2
248
+ #elif defined ( _AIX ) /* RS6000 */
249
+ /* Unknown */
250
+ #elif defined( __hpux ) /* HP-PA */
251
+ /* Unknown */
252
+ #elif defined( __aux ) /* 68K */
253
+ /* Unknown */
254
+ #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
255
+ # define DES_UNROLL
256
+ #elif defined( __sgi ) /* Newer MIPS */
257
+ # define DES_PTR
258
+ # define DES_RISC2
259
+ # define DES_UNROLL
260
+ #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
261
+ # define DES_PTR
262
+ # define DES_RISC1
263
+ # define DES_UNROLL
264
+ #endif /* Systems-specific speed defines */
265
+ #endif
266
+
267
+ #endif /* DES_DEFAULT_OPTIONS */
268
+ #endif /* HEADER_DES_LOCL_H */
269
+ #ifdef __cplusplus
270
+ }
271
+ #endif
@@ -0,0 +1,186 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup Label="ProjectConfigurations">
4
+ <ProjectConfiguration Include="Debug|Win32">
5
+ <Configuration>Debug</Configuration>
6
+ <Platform>Win32</Platform>
7
+ </ProjectConfiguration>
8
+ <ProjectConfiguration Include="Release|Win32">
9
+ <Configuration>Release</Configuration>
10
+ <Platform>Win32</Platform>
11
+ </ProjectConfiguration>
12
+ </ItemGroup>
13
+ <ItemGroup>
14
+ <ClCompile Include="aes\AESCrypt.cpp" />
15
+ <ClCompile Include="aes\openssl\openssl_aes_core.cpp" />
16
+ <ClCompile Include="aes\openssl\openssl_cfb128.cpp" />
17
+ <ClCompile Include="aes\openssl\openssl_md5_dgst.cpp" />
18
+ <ClCompile Include="aes\openssl\openssl_md5_one.cpp" />
19
+ <ClCompile Include="CodedInputData.cpp" />
20
+ <ClCompile Include="CodedInputDataCrypt.cpp" />
21
+ <ClCompile Include="CodedOutputData.cpp" />
22
+ <ClCompile Include="crc32\zlib\crc32.cpp" />
23
+ <ClCompile Include="InterProcessLock.cpp" />
24
+ <ClCompile Include="InterProcessLock_Win32.cpp" />
25
+ <ClCompile Include="KeyValueHolder.cpp" />
26
+ <ClCompile Include="MemoryFile_Win32.cpp" />
27
+ <ClCompile Include="MiniPBCoder.cpp" />
28
+ <ClCompile Include="MMBuffer.cpp" />
29
+ <ClCompile Include="MMKV.cpp" />
30
+ <ClCompile Include="MMKVLog.cpp" />
31
+ <ClCompile Include="MMKV_IO.cpp" />
32
+ <ClCompile Include="PBUtility.cpp" />
33
+ <ClCompile Include="ThreadLock_Win32.cpp" />
34
+ </ItemGroup>
35
+ <ItemGroup>
36
+ <ClInclude Include="aes\AESCrypt.h" />
37
+ <ClInclude Include="aes\openssl\openssl_aes.h" />
38
+ <ClInclude Include="aes\openssl\openssl_aes_locl.h" />
39
+ <ClInclude Include="aes\openssl\openssl_arm_arch.h" />
40
+ <ClInclude Include="aes\openssl\openssl_md32_common.h" />
41
+ <ClInclude Include="aes\openssl\openssl_md5.h" />
42
+ <ClInclude Include="aes\openssl\openssl_md5_locl.h" />
43
+ <ClInclude Include="aes\openssl\openssl_opensslconf.h" />
44
+ <ClInclude Include="CodedInputData.h" />
45
+ <ClInclude Include="CodedInputDataCrypt.h" />
46
+ <ClInclude Include="CodedOutputData.h" />
47
+ <ClInclude Include="crc32\Checksum.h" />
48
+ <ClInclude Include="crc32\zlib\crc32.h" />
49
+ <ClInclude Include="crc32\zlib\zconf.h" />
50
+ <ClInclude Include="crc32\zlib\zutil.h" />
51
+ <ClInclude Include="InterProcessLock.h" />
52
+ <ClInclude Include="KeyValueHolder.h" />
53
+ <ClInclude Include="MemoryFile.h" />
54
+ <ClInclude Include="MiniPBCoder.h" />
55
+ <ClInclude Include="MMBuffer.h" />
56
+ <ClInclude Include="MMKV.h" />
57
+ <ClInclude Include="MMKVLog.h" />
58
+ <ClInclude Include="MMKVMetaInfo.hpp" />
59
+ <ClInclude Include="MMKVPredef.h" />
60
+ <ClInclude Include="MMKV_IO.h" />
61
+ <ClInclude Include="PBEncodeItem.hpp" />
62
+ <ClInclude Include="PBUtility.h" />
63
+ <ClInclude Include="ScopedLock.hpp" />
64
+ <ClInclude Include="ThreadLock.h" />
65
+ </ItemGroup>
66
+ <PropertyGroup Label="Globals">
67
+ <ProjectGuid>{32CD39C9-37B5-3D38-A3D9-45E13F4AF9C5}</ProjectGuid>
68
+ <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
69
+ <Keyword>Win32Proj</Keyword>
70
+ <Platform>Win32</Platform>
71
+ <ProjectName>core</ProjectName>
72
+ <VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
73
+ </PropertyGroup>
74
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
75
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
76
+ <ConfigurationType>StaticLibrary</ConfigurationType>
77
+ <CharacterSet>Unicode</CharacterSet>
78
+ <PlatformToolset>v140</PlatformToolset>
79
+ </PropertyGroup>
80
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
81
+ <ConfigurationType>StaticLibrary</ConfigurationType>
82
+ <CharacterSet>Unicode</CharacterSet>
83
+ <PlatformToolset>v140</PlatformToolset>
84
+ </PropertyGroup>
85
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
86
+ <ImportGroup Label="ExtensionSettings">
87
+ </ImportGroup>
88
+ <ImportGroup Label="PropertySheets">
89
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
90
+ </ImportGroup>
91
+ <PropertyGroup Label="UserMacros" />
92
+ <PropertyGroup>
93
+ <_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
94
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
95
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
96
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mmkv</TargetName>
97
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.lib</TargetExt>
98
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
99
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
100
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mmkv</TargetName>
101
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.lib</TargetExt>
102
+ </PropertyGroup>
103
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
104
+ <ClCompile>
105
+ <AdditionalIncludeDirectories>Z:\mmkv\Core;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
106
+ <AdditionalOptions>%(AdditionalOptions) -std:c++latest</AdditionalOptions>
107
+ <AssemblerListingLocation>Debug/</AssemblerListingLocation>
108
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
109
+ <CompileAs>CompileAsCpp</CompileAs>
110
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
111
+ <ExceptionHandling>Sync</ExceptionHandling>
112
+ <InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
113
+ <Optimization>Disabled</Optimization>
114
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
115
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
116
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
117
+ <WarningLevel>Level3</WarningLevel>
118
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
119
+ <ObjectFileName>$(IntDir)</ObjectFileName>
120
+ </ClCompile>
121
+ <ResourceCompile>
122
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
123
+ <AdditionalIncludeDirectories>Z:\mmkv\Core;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
124
+ </ResourceCompile>
125
+ <Midl>
126
+ <AdditionalIncludeDirectories>Z:\mmkv\Core;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
127
+ <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
128
+ <HeaderFileName>%(Filename).h</HeaderFileName>
129
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
130
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
131
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
132
+ </Midl>
133
+ <Lib>
134
+ <AdditionalOptions>%(AdditionalOptions) /machine:X86</AdditionalOptions>
135
+ </Lib>
136
+ <PostBuildEvent>
137
+ <Command>for %%f in ("$(ProjectDir)MMKV.h", "$(ProjectDir)MMBuffer.h", "$(ProjectDir)MMKVPredef.h") do xcopy /y /i %%f "$(OutDir)\include\MMKV\"</Command>
138
+ </PostBuildEvent>
139
+ <PostBuildEvent>
140
+ <Message>Copying Headers</Message>
141
+ </PostBuildEvent>
142
+ </ItemDefinitionGroup>
143
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
144
+ <ClCompile>
145
+ <AdditionalIncludeDirectories>Z:\mmkv\Core;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
146
+ <AdditionalOptions>%(AdditionalOptions) -std:c++latest</AdditionalOptions>
147
+ <AssemblerListingLocation>Release/</AssemblerListingLocation>
148
+ <CompileAs>CompileAsCpp</CompileAs>
149
+ <ExceptionHandling>Sync</ExceptionHandling>
150
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
151
+ <Optimization>MaxSpeed</Optimization>
152
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
153
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
154
+ <RuntimeTypeInfo>true</RuntimeTypeInfo>
155
+ <WarningLevel>Level3</WarningLevel>
156
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;NDEBUG;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
157
+ <ObjectFileName>$(IntDir)</ObjectFileName>
158
+ <DebugInformationFormat>
159
+ </DebugInformationFormat>
160
+ </ClCompile>
161
+ <ResourceCompile>
162
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
163
+ <AdditionalIncludeDirectories>Z:\mmkv\Core;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
164
+ </ResourceCompile>
165
+ <Midl>
166
+ <AdditionalIncludeDirectories>Z:\mmkv\Core;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
167
+ <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
168
+ <HeaderFileName>%(Filename).h</HeaderFileName>
169
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
170
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
171
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
172
+ </Midl>
173
+ <Lib>
174
+ <AdditionalOptions>%(AdditionalOptions) /machine:X86</AdditionalOptions>
175
+ </Lib>
176
+ <PostBuildEvent>
177
+ <Command>for %%f in ("$(ProjectDir)MMKV.h", "$(ProjectDir)MMBuffer.h", "$(ProjectDir)MMKVPredef.h") do xcopy /y /i %%f "$(OutDir)\include\MMKV\"</Command>
178
+ </PostBuildEvent>
179
+ <PostBuildEvent>
180
+ <Message>Copying Headers</Message>
181
+ </PostBuildEvent>
182
+ </ItemDefinitionGroup>
183
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
184
+ <ImportGroup Label="ExtensionTargets">
185
+ </ImportGroup>
186
+ </Project>
@@ -0,0 +1,150 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <ItemGroup>
4
+ <Filter Include="Header Files">
5
+ <UniqueIdentifier>{A23FB4D7-B12B-3111-88E9-80ECCF93DBA8}</UniqueIdentifier>
6
+ </Filter>
7
+ <Filter Include="Source Files">
8
+ <UniqueIdentifier>{047F57F7-8EBB-3570-BBF5-21BCA0934FD5}</UniqueIdentifier>
9
+ </Filter>
10
+ </ItemGroup>
11
+ <ItemGroup>
12
+ <ClCompile Include="CodedInputData.cpp">
13
+ <Filter>Source Files</Filter>
14
+ </ClCompile>
15
+ <ClCompile Include="CodedOutputData.cpp">
16
+ <Filter>Source Files</Filter>
17
+ </ClCompile>
18
+ <ClCompile Include="aes\AESCrypt.cpp">
19
+ <Filter>Source Files</Filter>
20
+ </ClCompile>
21
+ <ClCompile Include="crc32\zlib\crc32.cpp">
22
+ <Filter>Source Files</Filter>
23
+ </ClCompile>
24
+ <ClCompile Include="InterProcessLock.cpp">
25
+ <Filter>Source Files</Filter>
26
+ </ClCompile>
27
+ <ClCompile Include="MemoryFile_Win32.cpp">
28
+ <Filter>Source Files</Filter>
29
+ </ClCompile>
30
+ <ClCompile Include="MMBuffer.cpp">
31
+ <Filter>Source Files</Filter>
32
+ </ClCompile>
33
+ <ClCompile Include="MMKV.cpp">
34
+ <Filter>Source Files</Filter>
35
+ </ClCompile>
36
+ <ClCompile Include="MMKVLog.cpp">
37
+ <Filter>Source Files</Filter>
38
+ </ClCompile>
39
+ <ClCompile Include="MiniPBCoder.cpp">
40
+ <Filter>Source Files</Filter>
41
+ </ClCompile>
42
+ <ClCompile Include="PBUtility.cpp">
43
+ <Filter>Source Files</Filter>
44
+ </ClCompile>
45
+ <ClCompile Include="ThreadLock_Win32.cpp">
46
+ <Filter>Source Files</Filter>
47
+ </ClCompile>
48
+ <ClCompile Include="InterProcessLock_Win32.cpp">
49
+ <Filter>Source Files</Filter>
50
+ </ClCompile>
51
+ <ClCompile Include="aes\openssl\openssl_aes_core.cpp">
52
+ <Filter>Source Files</Filter>
53
+ </ClCompile>
54
+ <ClCompile Include="aes\openssl\openssl_cfb128.cpp">
55
+ <Filter>Source Files</Filter>
56
+ </ClCompile>
57
+ <ClCompile Include="aes\openssl\openssl_md5_dgst.cpp">
58
+ <Filter>Source Files</Filter>
59
+ </ClCompile>
60
+ <ClCompile Include="aes\openssl\openssl_md5_one.cpp">
61
+ <Filter>Source Files</Filter>
62
+ </ClCompile>
63
+ <ClCompile Include="KeyValueHolder.cpp" />
64
+ <ClCompile Include="CodedInputDataCrypt.cpp" />
65
+ <ClCompile Include="MMKV_IO.cpp" />
66
+ </ItemGroup>
67
+ <ItemGroup>
68
+ <ClInclude Include="CodedInputData.h">
69
+ <Filter>Header Files</Filter>
70
+ </ClInclude>
71
+ <ClInclude Include="CodedOutputData.h">
72
+ <Filter>Header Files</Filter>
73
+ </ClInclude>
74
+ <ClInclude Include="InterProcessLock.h">
75
+ <Filter>Header Files</Filter>
76
+ </ClInclude>
77
+ <ClInclude Include="MemoryFile.h">
78
+ <Filter>Header Files</Filter>
79
+ </ClInclude>
80
+ <ClInclude Include="MiniPBCoder.h">
81
+ <Filter>Header Files</Filter>
82
+ </ClInclude>
83
+ <ClInclude Include="MMBuffer.h">
84
+ <Filter>Header Files</Filter>
85
+ </ClInclude>
86
+ <ClInclude Include="MMKV.h">
87
+ <Filter>Header Files</Filter>
88
+ </ClInclude>
89
+ <ClInclude Include="MMKVLog.h">
90
+ <Filter>Header Files</Filter>
91
+ </ClInclude>
92
+ <ClInclude Include="crc32\zlib\crc32.h">
93
+ <Filter>Header Files</Filter>
94
+ </ClInclude>
95
+ <ClInclude Include="crc32\zlib\zconf.h">
96
+ <Filter>Header Files</Filter>
97
+ </ClInclude>
98
+ <ClInclude Include="crc32\zlib\zutil.h">
99
+ <Filter>Header Files</Filter>
100
+ </ClInclude>
101
+ <ClInclude Include="aes\AESCrypt.h">
102
+ <Filter>Header Files</Filter>
103
+ </ClInclude>
104
+ <ClInclude Include="crc32\Checksum.h">
105
+ <Filter>Header Files</Filter>
106
+ </ClInclude>
107
+ <ClInclude Include="MMKVMetaInfo.hpp">
108
+ <Filter>Header Files</Filter>
109
+ </ClInclude>
110
+ <ClInclude Include="MMKVPredef.h">
111
+ <Filter>Header Files</Filter>
112
+ </ClInclude>
113
+ <ClInclude Include="PBEncodeItem.hpp">
114
+ <Filter>Header Files</Filter>
115
+ </ClInclude>
116
+ <ClInclude Include="PBUtility.h">
117
+ <Filter>Header Files</Filter>
118
+ </ClInclude>
119
+ <ClInclude Include="ScopedLock.hpp">
120
+ <Filter>Header Files</Filter>
121
+ </ClInclude>
122
+ <ClInclude Include="ThreadLock.h">
123
+ <Filter>Header Files</Filter>
124
+ </ClInclude>
125
+ <ClInclude Include="aes\openssl\openssl_aes.h">
126
+ <Filter>Header Files</Filter>
127
+ </ClInclude>
128
+ <ClInclude Include="aes\openssl\openssl_aes_locl.h">
129
+ <Filter>Header Files</Filter>
130
+ </ClInclude>
131
+ <ClInclude Include="aes\openssl\openssl_md5.h">
132
+ <Filter>Header Files</Filter>
133
+ </ClInclude>
134
+ <ClInclude Include="aes\openssl\openssl_md5_locl.h">
135
+ <Filter>Header Files</Filter>
136
+ </ClInclude>
137
+ <ClInclude Include="aes\openssl\openssl_opensslconf.h">
138
+ <Filter>Header Files</Filter>
139
+ </ClInclude>
140
+ <ClInclude Include="aes\openssl\openssl_md32_common.h">
141
+ <Filter>Header Files</Filter>
142
+ </ClInclude>
143
+ <ClInclude Include="aes\openssl\openssl_arm_arch.h">
144
+ <Filter>Header Files</Filter>
145
+ </ClInclude>
146
+ <ClInclude Include="KeyValueHolder.h" />
147
+ <ClInclude Include="CodedInputDataCrypt.h" />
148
+ <ClInclude Include="MMKV_IO.h" />
149
+ </ItemGroup>
150
+ </Project>
@@ -0,0 +1,67 @@
1
+ /*
2
+ * Tencent is pleased to support the open source community by making
3
+ * MMKV available.
4
+ *
5
+ * Copyright (C) 2018 THL A29 Limited, a Tencent company.
6
+ * All rights reserved.
7
+ *
8
+ * Licensed under the BSD 3-Clause License (the "License"); you may not use
9
+ * this file except in compliance with the License. You may obtain a copy of
10
+ * the License at
11
+ *
12
+ * https://opensource.org/licenses/BSD-3-Clause
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+
21
+ #ifndef CHECKSUM_H
22
+ #define CHECKSUM_H
23
+ #ifdef __cplusplus
24
+
25
+ #include "../MMKVPredef.h"
26
+
27
+ #if MMKV_EMBED_ZLIB
28
+
29
+ # include "zlib/zconf.h"
30
+
31
+ namespace zlib {
32
+
33
+ uLong crc32(uLong crc, const Bytef *buf, z_size_t len);
34
+
35
+ } // namespace zlib
36
+
37
+ # define ZLIB_CRC32(crc, buf, len) zlib::crc32(crc, buf, len)
38
+
39
+ #else // MMKV_EMBED_ZLIB
40
+
41
+ # include <zlib.h>
42
+
43
+ # define ZLIB_CRC32(crc, buf, len) ::crc32(crc, buf, static_cast<uInt>(len))
44
+
45
+ #endif // MMKV_EMBED_ZLIB
46
+
47
+
48
+ #if defined(__aarch64__) && defined(__linux__)
49
+
50
+ # define MMKV_USE_ARMV8_CRC32
51
+
52
+ namespace mmkv {
53
+ uint32_t armv8_crc32(uint32_t crc, const uint8_t *buf, size_t len);
54
+ }
55
+
56
+ // have to check CPU's instruction set dynamically
57
+ typedef uint32_t (*CRC32_Func_t)(uint32_t crc, const uint8_t *buf, size_t len);
58
+ extern CRC32_Func_t CRC32;
59
+
60
+ #else // defined(__aarch64__) && defined(__linux__)
61
+
62
+ # define CRC32(crc, buf, len) ZLIB_CRC32(crc, buf, len)
63
+
64
+ #endif // defined(__aarch64__) && defined(__linux__)
65
+
66
+ #endif // __cplusplus
67
+ #endif // CHECKSUM_H