hane 1.0.0
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/README.md +32 -0
- package/binding.gyp +87 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +1 -0
- package/package.json +33 -0
- package/src/native/addon.cc +231 -0
- package/src/native/zsign_driver.cc +87 -0
- package/src/native/zsign_driver.h +38 -0
- package/vendor/zlib/.cmake-format.yaml +245 -0
- package/vendor/zlib/.github/workflows/c-std.yml +230 -0
- package/vendor/zlib/.github/workflows/cmake.yml +112 -0
- package/vendor/zlib/.github/workflows/configure.yml +136 -0
- package/vendor/zlib/.github/workflows/fuzz.yml +25 -0
- package/vendor/zlib/.github/workflows/msys-cygwin.yml +77 -0
- package/vendor/zlib/BUILD.bazel +134 -0
- package/vendor/zlib/CMakeLists.txt +330 -0
- package/vendor/zlib/ChangeLog +1621 -0
- package/vendor/zlib/FAQ +367 -0
- package/vendor/zlib/INDEX +68 -0
- package/vendor/zlib/LICENSE +22 -0
- package/vendor/zlib/MODULE.bazel +9 -0
- package/vendor/zlib/Makefile.in +419 -0
- package/vendor/zlib/README +115 -0
- package/vendor/zlib/README-cmake.md +83 -0
- package/vendor/zlib/adler32.c +164 -0
- package/vendor/zlib/amiga/Makefile.pup +69 -0
- package/vendor/zlib/amiga/Makefile.sas +68 -0
- package/vendor/zlib/compress.c +75 -0
- package/vendor/zlib/configure +966 -0
- package/vendor/zlib/contrib/README.contrib +57 -0
- package/vendor/zlib/contrib/ada/buffer_demo.adb +106 -0
- package/vendor/zlib/contrib/ada/mtest.adb +156 -0
- package/vendor/zlib/contrib/ada/read.adb +156 -0
- package/vendor/zlib/contrib/ada/readme.txt +65 -0
- package/vendor/zlib/contrib/ada/test.adb +463 -0
- package/vendor/zlib/contrib/ada/zlib-streams.adb +225 -0
- package/vendor/zlib/contrib/ada/zlib-streams.ads +114 -0
- package/vendor/zlib/contrib/ada/zlib-thin.adb +142 -0
- package/vendor/zlib/contrib/ada/zlib-thin.ads +450 -0
- package/vendor/zlib/contrib/ada/zlib.adb +701 -0
- package/vendor/zlib/contrib/ada/zlib.ads +328 -0
- package/vendor/zlib/contrib/ada/zlib.gpr +20 -0
- package/vendor/zlib/contrib/blast/Makefile +8 -0
- package/vendor/zlib/contrib/blast/README +4 -0
- package/vendor/zlib/contrib/blast/blast.c +466 -0
- package/vendor/zlib/contrib/blast/blast.h +83 -0
- package/vendor/zlib/contrib/blast/test.pk +0 -0
- package/vendor/zlib/contrib/blast/test.txt +1 -0
- package/vendor/zlib/contrib/delphi/ZLib.pas +557 -0
- package/vendor/zlib/contrib/delphi/ZLibConst.pas +11 -0
- package/vendor/zlib/contrib/delphi/readme.txt +76 -0
- package/vendor/zlib/contrib/delphi/zlibd32.mak +99 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs +58 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs +202 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs +83 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/CodecBase.cs +198 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/Deflater.cs +106 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/DotZLib.cs +288 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj +141 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/GZipStream.cs +301 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/Inflater.cs +105 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib/UnitTests.cs +274 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib.build +33 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib.chm +0 -0
- package/vendor/zlib/contrib/dotzlib/DotZLib.sln +21 -0
- package/vendor/zlib/contrib/dotzlib/LICENSE_1_0.txt +23 -0
- package/vendor/zlib/contrib/dotzlib/readme.txt +58 -0
- package/vendor/zlib/contrib/gcc_gvmat64/gvmat64.S +574 -0
- package/vendor/zlib/contrib/infback9/README +1 -0
- package/vendor/zlib/contrib/infback9/infback9.c +603 -0
- package/vendor/zlib/contrib/infback9/infback9.h +37 -0
- package/vendor/zlib/contrib/infback9/inffix9.h +107 -0
- package/vendor/zlib/contrib/infback9/inflate9.h +47 -0
- package/vendor/zlib/contrib/infback9/inftree9.c +319 -0
- package/vendor/zlib/contrib/infback9/inftree9.h +61 -0
- package/vendor/zlib/contrib/iostream/test.cpp +24 -0
- package/vendor/zlib/contrib/iostream/zfstream.cpp +329 -0
- package/vendor/zlib/contrib/iostream/zfstream.h +128 -0
- package/vendor/zlib/contrib/iostream2/zstream.h +307 -0
- package/vendor/zlib/contrib/iostream2/zstream_test.cpp +25 -0
- package/vendor/zlib/contrib/iostream3/README +35 -0
- package/vendor/zlib/contrib/iostream3/TODO +17 -0
- package/vendor/zlib/contrib/iostream3/test.cc +50 -0
- package/vendor/zlib/contrib/iostream3/zfstream.cc +479 -0
- package/vendor/zlib/contrib/iostream3/zfstream.h +466 -0
- package/vendor/zlib/contrib/minizip/CMakeLists.txt +380 -0
- package/vendor/zlib/contrib/minizip/Makefile +37 -0
- package/vendor/zlib/contrib/minizip/Makefile.am +45 -0
- package/vendor/zlib/contrib/minizip/MiniZip64_Changes.txt +6 -0
- package/vendor/zlib/contrib/minizip/MiniZip64_info.txt +74 -0
- package/vendor/zlib/contrib/minizip/configure.ac +32 -0
- package/vendor/zlib/contrib/minizip/crypt.h +128 -0
- package/vendor/zlib/contrib/minizip/ints.h +57 -0
- package/vendor/zlib/contrib/minizip/ioapi.c +231 -0
- package/vendor/zlib/contrib/minizip/ioapi.h +183 -0
- package/vendor/zlib/contrib/minizip/iowin32.c +448 -0
- package/vendor/zlib/contrib/minizip/iowin32.h +28 -0
- package/vendor/zlib/contrib/minizip/make_vms.com +25 -0
- package/vendor/zlib/contrib/minizip/miniunz.c +647 -0
- package/vendor/zlib/contrib/minizip/miniunzip.1 +63 -0
- package/vendor/zlib/contrib/minizip/minizip.1 +46 -0
- package/vendor/zlib/contrib/minizip/minizip.c +512 -0
- package/vendor/zlib/contrib/minizip/minizip.pc.in +12 -0
- package/vendor/zlib/contrib/minizip/minizip.pc.txt +13 -0
- package/vendor/zlib/contrib/minizip/minizipConfig.cmake.in +35 -0
- package/vendor/zlib/contrib/minizip/mztools.c +288 -0
- package/vendor/zlib/contrib/minizip/mztools.h +37 -0
- package/vendor/zlib/contrib/minizip/skipset.h +361 -0
- package/vendor/zlib/contrib/minizip/test/CMakeLists.txt +121 -0
- package/vendor/zlib/contrib/minizip/test/add_subdirectory_exclude_test.cmake.in +29 -0
- package/vendor/zlib/contrib/minizip/test/add_subdirectory_test.cmake.in +28 -0
- package/vendor/zlib/contrib/minizip/test/find_package_test.cmake.in +25 -0
- package/vendor/zlib/contrib/minizip/test/test_helper.cm +32 -0
- package/vendor/zlib/contrib/minizip/unzip.c +1981 -0
- package/vendor/zlib/contrib/minizip/unzip.h +441 -0
- package/vendor/zlib/contrib/minizip/zip.c +2199 -0
- package/vendor/zlib/contrib/minizip/zip.h +370 -0
- package/vendor/zlib/contrib/nuget/nuget.csproj +43 -0
- package/vendor/zlib/contrib/nuget/nuget.sln +22 -0
- package/vendor/zlib/contrib/pascal/example.pas +599 -0
- package/vendor/zlib/contrib/pascal/readme.txt +76 -0
- package/vendor/zlib/contrib/pascal/zlibd32.mak +99 -0
- package/vendor/zlib/contrib/pascal/zlibpas.pas +276 -0
- package/vendor/zlib/contrib/puff/Makefile +42 -0
- package/vendor/zlib/contrib/puff/README +63 -0
- package/vendor/zlib/contrib/puff/puff.c +840 -0
- package/vendor/zlib/contrib/puff/puff.h +35 -0
- package/vendor/zlib/contrib/puff/pufftest.c +169 -0
- package/vendor/zlib/contrib/puff/zeros.raw +0 -0
- package/vendor/zlib/contrib/testzlib/testzlib.c +275 -0
- package/vendor/zlib/contrib/testzlib/testzlib.txt +10 -0
- package/vendor/zlib/contrib/untgz/Makefile +14 -0
- package/vendor/zlib/contrib/untgz/Makefile.msc +17 -0
- package/vendor/zlib/contrib/untgz/untgz.c +667 -0
- package/vendor/zlib/contrib/vstudio/readme.txt +81 -0
- package/vendor/zlib/contrib/vstudio/vc10/miniunz.vcxproj +310 -0
- package/vendor/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters +22 -0
- package/vendor/zlib/contrib/vstudio/vc10/minizip.vcxproj +307 -0
- package/vendor/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters +22 -0
- package/vendor/zlib/contrib/vstudio/vc10/testzlib.vcxproj +412 -0
- package/vendor/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters +55 -0
- package/vendor/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj +310 -0
- package/vendor/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters +22 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibstat.vcxproj +449 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters +74 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibvc.sln +135 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibvc.vcxproj +633 -0
- package/vendor/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters +115 -0
- package/vendor/zlib/contrib/vstudio/vc11/miniunz.vcxproj +314 -0
- package/vendor/zlib/contrib/vstudio/vc11/minizip.vcxproj +311 -0
- package/vendor/zlib/contrib/vstudio/vc11/testzlib.vcxproj +418 -0
- package/vendor/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj +314 -0
- package/vendor/zlib/contrib/vstudio/vc11/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc11/zlibstat.vcxproj +456 -0
- package/vendor/zlib/contrib/vstudio/vc11/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc11/zlibvc.sln +117 -0
- package/vendor/zlib/contrib/vstudio/vc11/zlibvc.vcxproj +664 -0
- package/vendor/zlib/contrib/vstudio/vc12/miniunz.vcxproj +316 -0
- package/vendor/zlib/contrib/vstudio/vc12/minizip.vcxproj +313 -0
- package/vendor/zlib/contrib/vstudio/vc12/testzlib.vcxproj +422 -0
- package/vendor/zlib/contrib/vstudio/vc12/testzlibdll.vcxproj +316 -0
- package/vendor/zlib/contrib/vstudio/vc12/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc12/zlibstat.vcxproj +459 -0
- package/vendor/zlib/contrib/vstudio/vc12/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc12/zlibvc.sln +119 -0
- package/vendor/zlib/contrib/vstudio/vc12/zlibvc.vcxproj +668 -0
- package/vendor/zlib/contrib/vstudio/vc14/miniunz.vcxproj +316 -0
- package/vendor/zlib/contrib/vstudio/vc14/minizip.vcxproj +313 -0
- package/vendor/zlib/contrib/vstudio/vc14/testzlib.vcxproj +422 -0
- package/vendor/zlib/contrib/vstudio/vc14/testzlibdll.vcxproj +316 -0
- package/vendor/zlib/contrib/vstudio/vc14/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc14/zlibstat.vcxproj +459 -0
- package/vendor/zlib/contrib/vstudio/vc14/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc14/zlibvc.sln +119 -0
- package/vendor/zlib/contrib/vstudio/vc14/zlibvc.vcxproj +668 -0
- package/vendor/zlib/contrib/vstudio/vc17/miniunz.vcxproj +409 -0
- package/vendor/zlib/contrib/vstudio/vc17/minizip.vcxproj +405 -0
- package/vendor/zlib/contrib/vstudio/vc17/testzlib.vcxproj +473 -0
- package/vendor/zlib/contrib/vstudio/vc17/testzlibdll.vcxproj +409 -0
- package/vendor/zlib/contrib/vstudio/vc17/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc17/zlibstat.vcxproj +602 -0
- package/vendor/zlib/contrib/vstudio/vc17/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc17/zlibvc.sln +179 -0
- package/vendor/zlib/contrib/vstudio/vc17/zlibvc.vcxproj +875 -0
- package/vendor/zlib/contrib/vstudio/vc9/miniunz.vcproj +565 -0
- package/vendor/zlib/contrib/vstudio/vc9/minizip.vcproj +562 -0
- package/vendor/zlib/contrib/vstudio/vc9/testzlib.vcproj +796 -0
- package/vendor/zlib/contrib/vstudio/vc9/testzlibdll.vcproj +565 -0
- package/vendor/zlib/contrib/vstudio/vc9/zlib.rc +32 -0
- package/vendor/zlib/contrib/vstudio/vc9/zlibstat.vcproj +781 -0
- package/vendor/zlib/contrib/vstudio/vc9/zlibvc.def +161 -0
- package/vendor/zlib/contrib/vstudio/vc9/zlibvc.sln +144 -0
- package/vendor/zlib/contrib/vstudio/vc9/zlibvc.vcproj +1100 -0
- package/vendor/zlib/crc32.c +1049 -0
- package/vendor/zlib/crc32.h +9446 -0
- package/vendor/zlib/deflate.c +2152 -0
- package/vendor/zlib/deflate.h +380 -0
- package/vendor/zlib/doc/algorithm.txt +209 -0
- package/vendor/zlib/doc/crc-doc.1.0.pdf +0 -0
- package/vendor/zlib/doc/rfc1950.txt +619 -0
- package/vendor/zlib/doc/rfc1951.txt +955 -0
- package/vendor/zlib/doc/rfc1952.txt +675 -0
- package/vendor/zlib/doc/txtvsbin.txt +107 -0
- package/vendor/zlib/examples/README.examples +54 -0
- package/vendor/zlib/examples/enough.c +597 -0
- package/vendor/zlib/examples/fitblk.c +233 -0
- package/vendor/zlib/examples/gun.c +702 -0
- package/vendor/zlib/examples/gzappend.c +504 -0
- package/vendor/zlib/examples/gzjoin.c +449 -0
- package/vendor/zlib/examples/gzlog.c +1061 -0
- package/vendor/zlib/examples/gzlog.h +91 -0
- package/vendor/zlib/examples/gznorm.c +474 -0
- package/vendor/zlib/examples/zlib_how.html +549 -0
- package/vendor/zlib/examples/zpipe.c +209 -0
- package/vendor/zlib/examples/zran.c +550 -0
- package/vendor/zlib/examples/zran.h +53 -0
- package/vendor/zlib/gzclose.c +23 -0
- package/vendor/zlib/gzguts.h +215 -0
- package/vendor/zlib/gzlib.c +585 -0
- package/vendor/zlib/gzread.c +603 -0
- package/vendor/zlib/gzwrite.c +631 -0
- package/vendor/zlib/infback.c +628 -0
- package/vendor/zlib/inffast.c +320 -0
- package/vendor/zlib/inffast.h +11 -0
- package/vendor/zlib/inffixed.h +94 -0
- package/vendor/zlib/inflate.c +1526 -0
- package/vendor/zlib/inflate.h +126 -0
- package/vendor/zlib/inftrees.c +299 -0
- package/vendor/zlib/inftrees.h +62 -0
- package/vendor/zlib/make_vms.com +867 -0
- package/vendor/zlib/msdos/Makefile.bor +115 -0
- package/vendor/zlib/msdos/Makefile.dj2 +104 -0
- package/vendor/zlib/msdos/Makefile.emx +69 -0
- package/vendor/zlib/msdos/Makefile.msc +112 -0
- package/vendor/zlib/msdos/Makefile.tc +100 -0
- package/vendor/zlib/nintendods/Makefile +126 -0
- package/vendor/zlib/nintendods/README +5 -0
- package/vendor/zlib/old/Makefile.emx +69 -0
- package/vendor/zlib/old/Makefile.riscos +151 -0
- package/vendor/zlib/old/README +3 -0
- package/vendor/zlib/old/descrip.mms +48 -0
- package/vendor/zlib/old/os2/Makefile.os2 +136 -0
- package/vendor/zlib/old/os2/zlib.def +51 -0
- package/vendor/zlib/old/visual-basic.txt +160 -0
- package/vendor/zlib/os400/README400 +48 -0
- package/vendor/zlib/os400/bndsrc +133 -0
- package/vendor/zlib/os400/make.sh +366 -0
- package/vendor/zlib/os400/zlib.inc +531 -0
- package/vendor/zlib/qnx/package.qpg +141 -0
- package/vendor/zlib/test/CMakeLists.txt +265 -0
- package/vendor/zlib/test/add_subdirectory_exclude_test.cmake.in +29 -0
- package/vendor/zlib/test/add_subdirectory_test.cmake.in +28 -0
- package/vendor/zlib/test/example.c +552 -0
- package/vendor/zlib/test/find_package_test.cmake.in +26 -0
- package/vendor/zlib/test/infcover.c +672 -0
- package/vendor/zlib/test/minigzip.c +590 -0
- package/vendor/zlib/treebuild.xml +116 -0
- package/vendor/zlib/trees.c +1119 -0
- package/vendor/zlib/trees.h +128 -0
- package/vendor/zlib/uncompr.c +85 -0
- package/vendor/zlib/watcom/watcom_f.mak +43 -0
- package/vendor/zlib/watcom/watcom_l.mak +43 -0
- package/vendor/zlib/win32/DLL_FAQ.txt +381 -0
- package/vendor/zlib/win32/Makefile.bor +109 -0
- package/vendor/zlib/win32/Makefile.gcc +177 -0
- package/vendor/zlib/win32/Makefile.msc +159 -0
- package/vendor/zlib/win32/README-WIN32.txt +103 -0
- package/vendor/zlib/win32/VisualC.txt +3 -0
- package/vendor/zlib/win32/zlib.def +98 -0
- package/vendor/zlib/win32/zlib1.rc +37 -0
- package/vendor/zlib/zconf.h.in +544 -0
- package/vendor/zlib/zlib.3 +149 -0
- package/vendor/zlib/zlib.3.pdf +0 -0
- package/vendor/zlib/zlib.h +1957 -0
- package/vendor/zlib/zlib.map +104 -0
- package/vendor/zlib/zlib.pc.cmakein +13 -0
- package/vendor/zlib/zlib.pc.in +13 -0
- package/vendor/zlib/zlibConfig.cmake.in +26 -0
- package/vendor/zlib/zutil.c +299 -0
- package/vendor/zlib/zutil.h +257 -0
- package/vendor/zsign/.gitattributes +4 -0
- package/vendor/zsign/LICENSE +21 -0
- package/vendor/zsign/README.md +142 -0
- package/vendor/zsign/build/linux/Makefile +43 -0
- package/vendor/zsign/build/macos/Makefile +43 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/crypt.h +128 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/ioapi.h +216 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/iowin32.h +28 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/mztools.h +37 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/unzip.h +437 -0
- package/vendor/zsign/build/windows/vs2022/include/minizip/zip.h +364 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/__DECC_INCLUDE_EPILOGUE.H +22 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/__DECC_INCLUDE_PROLOGUE.H +26 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/aes.h +111 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/applink.c +153 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/asn1.h +1133 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/asn1_mac.h +10 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/asn1err.h +142 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/asn1t.h +946 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/async.h +104 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/asyncerr.h +29 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/bio.h +1015 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/bioerr.h +72 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/blowfish.h +78 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/bn.h +590 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/bnerr.h +47 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/buffer.h +62 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/buffererr.h +25 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/camellia.h +117 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cast.h +71 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cmac.h +52 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cmp.h +727 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cmp_util.h +56 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cmperr.h +131 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cms.h +508 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cmserr.h +125 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/comp.h +98 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/comperr.h +38 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/conf.h +214 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/conf_api.h +46 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/conferr.h +52 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/configuration.h +188 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/conftypes.h +44 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/core.h +236 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/core_dispatch.h +1022 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/core_names.h +545 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/core_object.h +41 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/crmf.h +260 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/crmferr.h +50 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/crypto.h +580 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cryptoerr.h +56 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cryptoerr_legacy.h +1466 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ct.h +573 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/cterr.h +45 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/decoder.h +133 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/decodererr.h +28 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/des.h +211 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/dh.h +339 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/dherr.h +59 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/dsa.h +280 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/dsaerr.h +44 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/dtls1.h +57 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/e_os2.h +310 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/e_ostime.h +38 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ebcdic.h +39 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ec.h +1588 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ecdh.h +10 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ecdsa.h +10 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ecerr.h +104 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/encoder.h +124 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/encodererr.h +28 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/engine.h +833 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/engineerr.h +63 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/err.h +512 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ess.h +128 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/esserr.h +32 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/evp.h +2231 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/evperr.h +140 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/fips_names.h +50 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/fipskey.h +41 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/hmac.h +62 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/hpke.h +169 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/http.h +118 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/httperr.h +56 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/idea.h +82 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/indicator.h +31 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/kdf.h +138 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/kdferr.h +16 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/lhash.h +398 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/macros.h +338 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/md2.h +56 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/md4.h +63 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/md5.h +62 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/mdc2.h +55 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/modes.h +219 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/obj_mac.h +5820 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/objects.h +184 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/objectserr.h +28 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ocsp.h +483 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ocsperr.h +53 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/opensslconf.h +17 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/opensslv.h +114 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ossl_typ.h +16 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/param_build.h +63 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/params.h +160 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pem.h +543 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pem2.h +19 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pemerr.h +58 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pkcs12.h +366 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pkcs12err.h +46 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pkcs7.h +430 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/pkcs7err.h +63 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/prov_ssl.h +38 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/proverr.h +162 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/provider.h +66 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/quic.h +70 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rand.h +125 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/randerr.h +69 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rc2.h +68 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rc4.h +47 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rc5.h +79 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ripemd.h +59 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rsa.h +615 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/rsaerr.h +107 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/safestack.h +297 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/seed.h +113 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/self_test.h +98 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/sha.h +139 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/srp.h +285 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/srtp.h +68 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ssl.h +2878 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ssl2.h +30 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ssl3.h +357 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/sslerr.h +379 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/sslerr_legacy.h +467 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/stack.h +90 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/store.h +377 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/storeerr.h +49 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/symhacks.h +39 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/thread.h +31 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/tls1.h +1220 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/trace.h +320 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ts.h +522 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/tserr.h +67 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/txt_db.h +63 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/types.h +245 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/ui.h +407 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/uierr.h +38 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/whrlpool.h +62 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509.h +1304 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509_acert.h +263 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509_vfy.h +902 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509err.h +70 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509v3.h +1500 -0
- package/vendor/zsign/build/windows/vs2022/include/openssl/x509v3err.h +96 -0
- package/vendor/zsign/build/windows/vs2022/include/zlib/zconf.h +553 -0
- package/vendor/zsign/build/windows/vs2022/include/zlib/zlib.h +1938 -0
- package/vendor/zsign/build/windows/vs2022/lib/minizip/x64/mt/minizip.lib +0 -0
- package/vendor/zsign/build/windows/vs2022/lib/openssl/x64/mt/libcrypto.lib +0 -0
- package/vendor/zsign/build/windows/vs2022/lib/openssl/x64/mt/libssl.lib +0 -0
- package/vendor/zsign/build/windows/vs2022/lib/zlib/x64/mt/zlib.lib +0 -0
- package/vendor/zsign/build/windows/vs2022/zsign/src/common_win32.h +44 -0
- package/vendor/zsign/build/windows/vs2022/zsign/src/getopt.cpp +69 -0
- package/vendor/zsign/build/windows/vs2022/zsign/src/getopt.h +20 -0
- package/vendor/zsign/build/windows/vs2022/zsign/src/iconv.cpp +138 -0
- package/vendor/zsign/build/windows/vs2022/zsign/src/iconv.h +38 -0
- package/vendor/zsign/build/windows/vs2022/zsign/zsign.vcxproj +177 -0
- package/vendor/zsign/build/windows/vs2022/zsign/zsign.vcxproj.filters +120 -0
- package/vendor/zsign/build/windows/vs2022/zsign.sln +28 -0
- package/vendor/zsign/src/archo.cpp +742 -0
- package/vendor/zsign/src/archo.h +61 -0
- package/vendor/zsign/src/bundle.cpp +589 -0
- package/vendor/zsign/src/bundle.h +46 -0
- package/vendor/zsign/src/common/archive.cpp +246 -0
- package/vendor/zsign/src/common/archive.h +22 -0
- package/vendor/zsign/src/common/base64.cpp +166 -0
- package/vendor/zsign/src/common/base64.h +30 -0
- package/vendor/zsign/src/common/common.h +56 -0
- package/vendor/zsign/src/common/fs.cpp +573 -0
- package/vendor/zsign/src/common/fs.h +50 -0
- package/vendor/zsign/src/common/json.cpp +3380 -0
- package/vendor/zsign/src/common/json.h +530 -0
- package/vendor/zsign/src/common/log.cpp +145 -0
- package/vendor/zsign/src/common/log.h +37 -0
- package/vendor/zsign/src/common/mach-o.h +585 -0
- package/vendor/zsign/src/common/sha.cpp +133 -0
- package/vendor/zsign/src/common/sha.h +24 -0
- package/vendor/zsign/src/common/timer.cpp +28 -0
- package/vendor/zsign/src/common/timer.h +17 -0
- package/vendor/zsign/src/common/util.cpp +185 -0
- package/vendor/zsign/src/common/util.h +25 -0
- package/vendor/zsign/src/macho.cpp +273 -0
- package/vendor/zsign/src/macho.h +38 -0
- package/vendor/zsign/src/openssl.cpp +698 -0
- package/vendor/zsign/src/openssl.h +71 -0
- package/vendor/zsign/src/signing.cpp +745 -0
- package/vendor/zsign/src/signing.h +59 -0
- package/vendor/zsign/src/zsign.cpp +317 -0
- package/vendor/zsign/test/dylib/bin/demo1.dylib +0 -0
- package/vendor/zsign/test/dylib/bin/demo2.dylib +0 -0
- package/vendor/zsign/test/dylib/demo/Makefile +12 -0
- package/vendor/zsign/test/dylib/demo/control +9 -0
- package/vendor/zsign/test/dylib/demo/demo.m +21 -0
- package/vendor/zsign/test/linux/test.sh +19 -0
- package/vendor/zsign/test/macos/test.sh +19 -0
- package/vendor/zsign/test/windows/test.ps1 +17 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Makefile for zlib
|
|
2
|
+
# For use with Delphi and C++ Builder under Win32
|
|
3
|
+
# Updated for zlib 1.2.x by Cosmin Truta
|
|
4
|
+
|
|
5
|
+
# ------------ Borland C++ ------------
|
|
6
|
+
|
|
7
|
+
# This project uses the Delphi (fastcall/register) calling convention:
|
|
8
|
+
LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl
|
|
9
|
+
|
|
10
|
+
CC = bcc32
|
|
11
|
+
LD = bcc32
|
|
12
|
+
AR = tlib
|
|
13
|
+
# do not use "-pr" in CFLAGS
|
|
14
|
+
CFLAGS = -a -d -k- -O2 $(LOC)
|
|
15
|
+
LDFLAGS =
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# variables
|
|
19
|
+
ZLIB_LIB = zlib.lib
|
|
20
|
+
|
|
21
|
+
OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
|
|
22
|
+
OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
|
|
23
|
+
OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
|
|
24
|
+
OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# targets
|
|
28
|
+
all: $(ZLIB_LIB) example.exe minigzip.exe
|
|
29
|
+
|
|
30
|
+
.c.obj:
|
|
31
|
+
$(CC) -c $(CFLAGS) $*.c
|
|
32
|
+
|
|
33
|
+
adler32.obj: adler32.c zlib.h zconf.h
|
|
34
|
+
|
|
35
|
+
compress.obj: compress.c zlib.h zconf.h
|
|
36
|
+
|
|
37
|
+
crc32.obj: crc32.c zlib.h zconf.h crc32.h
|
|
38
|
+
|
|
39
|
+
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
|
|
40
|
+
|
|
41
|
+
gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
|
|
42
|
+
|
|
43
|
+
gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
|
|
44
|
+
|
|
45
|
+
gzread.obj: gzread.c zlib.h zconf.h gzguts.h
|
|
46
|
+
|
|
47
|
+
gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
|
|
48
|
+
|
|
49
|
+
infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
|
|
50
|
+
inffast.h inffixed.h
|
|
51
|
+
|
|
52
|
+
inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
|
|
53
|
+
inffast.h
|
|
54
|
+
|
|
55
|
+
inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
|
|
56
|
+
inffast.h inffixed.h
|
|
57
|
+
|
|
58
|
+
inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
|
|
59
|
+
|
|
60
|
+
trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
|
|
61
|
+
|
|
62
|
+
uncompr.obj: uncompr.c zlib.h zconf.h
|
|
63
|
+
|
|
64
|
+
zutil.obj: zutil.c zutil.h zlib.h zconf.h
|
|
65
|
+
|
|
66
|
+
example.obj: test/example.c zlib.h zconf.h
|
|
67
|
+
|
|
68
|
+
minigzip.obj: test/minigzip.c zlib.h zconf.h
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# For the sake of the old Borland make,
|
|
72
|
+
# the command line is cut to fit in the MS-DOS 128 byte limit:
|
|
73
|
+
$(ZLIB_LIB): $(OBJ1) $(OBJ2)
|
|
74
|
+
-del $(ZLIB_LIB)
|
|
75
|
+
$(AR) $(ZLIB_LIB) $(OBJP1)
|
|
76
|
+
$(AR) $(ZLIB_LIB) $(OBJP2)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# testing
|
|
80
|
+
test: example.exe minigzip.exe
|
|
81
|
+
example
|
|
82
|
+
echo hello world | minigzip | minigzip -d
|
|
83
|
+
|
|
84
|
+
example.exe: example.obj $(ZLIB_LIB)
|
|
85
|
+
$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
|
|
86
|
+
|
|
87
|
+
minigzip.exe: minigzip.obj $(ZLIB_LIB)
|
|
88
|
+
$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
# cleanup
|
|
92
|
+
clean:
|
|
93
|
+
-del *.obj
|
|
94
|
+
-del *.exe
|
|
95
|
+
-del *.lib
|
|
96
|
+
-del *.tds
|
|
97
|
+
-del zlib.bak
|
|
98
|
+
-del foo.gz
|
|
99
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
using System.Reflection;
|
|
2
|
+
using System.Runtime.CompilerServices;
|
|
3
|
+
|
|
4
|
+
//
|
|
5
|
+
// General Information about an assembly is controlled through the following
|
|
6
|
+
// set of attributes. Change these attribute values to modify the information
|
|
7
|
+
// associated with an assembly.
|
|
8
|
+
//
|
|
9
|
+
[assembly: AssemblyTitle("DotZLib")]
|
|
10
|
+
[assembly: AssemblyDescription(".Net bindings for ZLib compression dll 1.2.x")]
|
|
11
|
+
[assembly: AssemblyConfiguration("")]
|
|
12
|
+
[assembly: AssemblyCompany("Henrik Ravn")]
|
|
13
|
+
[assembly: AssemblyProduct("")]
|
|
14
|
+
[assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")]
|
|
15
|
+
[assembly: AssemblyTrademark("")]
|
|
16
|
+
[assembly: AssemblyCulture("")]
|
|
17
|
+
|
|
18
|
+
//
|
|
19
|
+
// Version information for an assembly consists of the following four values:
|
|
20
|
+
//
|
|
21
|
+
// Major Version
|
|
22
|
+
// Minor Version
|
|
23
|
+
// Build Number
|
|
24
|
+
// Revision
|
|
25
|
+
//
|
|
26
|
+
// You can specify all the values or you can default the Revision and Build Numbers
|
|
27
|
+
// by using the '*' as shown below:
|
|
28
|
+
|
|
29
|
+
[assembly: AssemblyVersion("1.0.*")]
|
|
30
|
+
|
|
31
|
+
//
|
|
32
|
+
// In order to sign your assembly you must specify a key to use. Refer to the
|
|
33
|
+
// Microsoft .NET Framework documentation for more information on assembly signing.
|
|
34
|
+
//
|
|
35
|
+
// Use the attributes below to control which key is used for signing.
|
|
36
|
+
//
|
|
37
|
+
// Notes:
|
|
38
|
+
// (*) If no key is specified, the assembly is not signed.
|
|
39
|
+
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
|
40
|
+
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
|
41
|
+
// a key.
|
|
42
|
+
// (*) If the KeyFile and the KeyName values are both specified, the
|
|
43
|
+
// following processing occurs:
|
|
44
|
+
// (1) If the KeyName can be found in the CSP, that key is used.
|
|
45
|
+
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
|
46
|
+
// in the KeyFile is installed into the CSP and used.
|
|
47
|
+
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
|
48
|
+
// When specifying the KeyFile, the location of the KeyFile should be
|
|
49
|
+
// relative to the project output directory which is
|
|
50
|
+
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
|
|
51
|
+
// located in the project directory, you would specify the AssemblyKeyFile
|
|
52
|
+
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
|
|
53
|
+
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
|
54
|
+
// documentation for more information on this.
|
|
55
|
+
//
|
|
56
|
+
[assembly: AssemblyDelaySign(false)]
|
|
57
|
+
[assembly: AssemblyKeyFile("")]
|
|
58
|
+
[assembly: AssemblyKeyName("")]
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
//
|
|
2
|
+
// � Copyright Henrik Ravn 2004
|
|
3
|
+
//
|
|
4
|
+
// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
|
|
5
|
+
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
using System;
|
|
9
|
+
using System.Runtime.InteropServices;
|
|
10
|
+
using System.Text;
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
namespace DotZLib
|
|
14
|
+
{
|
|
15
|
+
#region ChecksumGeneratorBase
|
|
16
|
+
/// <summary>
|
|
17
|
+
/// Implements the common functionality needed for all <see cref="ChecksumGenerator"/>s
|
|
18
|
+
/// </summary>
|
|
19
|
+
/// <example></example>
|
|
20
|
+
public abstract class ChecksumGeneratorBase : ChecksumGenerator
|
|
21
|
+
{
|
|
22
|
+
/// <summary>
|
|
23
|
+
/// The value of the current checksum
|
|
24
|
+
/// </summary>
|
|
25
|
+
protected uint _current;
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
/// Initializes a new instance of the checksum generator base - the current checksum is
|
|
29
|
+
/// set to zero
|
|
30
|
+
/// </summary>
|
|
31
|
+
public ChecksumGeneratorBase()
|
|
32
|
+
{
|
|
33
|
+
_current = 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/// <summary>
|
|
37
|
+
/// Initializes a new instance of the checksum generator base with a specified value
|
|
38
|
+
/// </summary>
|
|
39
|
+
/// <param name="initialValue">The value to set the current checksum to</param>
|
|
40
|
+
public ChecksumGeneratorBase(uint initialValue)
|
|
41
|
+
{
|
|
42
|
+
_current = initialValue;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/// <summary>
|
|
46
|
+
/// Resets the current checksum to zero
|
|
47
|
+
/// </summary>
|
|
48
|
+
public void Reset() { _current = 0; }
|
|
49
|
+
|
|
50
|
+
/// <summary>
|
|
51
|
+
/// Gets the current checksum value
|
|
52
|
+
/// </summary>
|
|
53
|
+
public uint Value { get { return _current; } }
|
|
54
|
+
|
|
55
|
+
/// <summary>
|
|
56
|
+
/// Updates the current checksum with part of an array of bytes
|
|
57
|
+
/// </summary>
|
|
58
|
+
/// <param name="data">The data to update the checksum with</param>
|
|
59
|
+
/// <param name="offset">Where in <c>data</c> to start updating</param>
|
|
60
|
+
/// <param name="count">The number of bytes from <c>data</c> to use</param>
|
|
61
|
+
/// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
|
|
62
|
+
/// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
|
|
63
|
+
/// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
|
|
64
|
+
/// <remarks>All the other <c>Update</c> methods are implemented in terms of this one.
|
|
65
|
+
/// This is therefore the only method a derived class has to implement</remarks>
|
|
66
|
+
public abstract void Update(byte[] data, int offset, int count);
|
|
67
|
+
|
|
68
|
+
/// <summary>
|
|
69
|
+
/// Updates the current checksum with an array of bytes.
|
|
70
|
+
/// </summary>
|
|
71
|
+
/// <param name="data">The data to update the checksum with</param>
|
|
72
|
+
public void Update(byte[] data)
|
|
73
|
+
{
|
|
74
|
+
Update(data, 0, data.Length);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/// <summary>
|
|
78
|
+
/// Updates the current checksum with the data from a string
|
|
79
|
+
/// </summary>
|
|
80
|
+
/// <param name="data">The string to update the checksum with</param>
|
|
81
|
+
/// <remarks>The characters in the string are converted by the UTF-8 encoding</remarks>
|
|
82
|
+
public void Update(string data)
|
|
83
|
+
{
|
|
84
|
+
Update(Encoding.UTF8.GetBytes(data));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/// <summary>
|
|
88
|
+
/// Updates the current checksum with the data from a string, using a specific encoding
|
|
89
|
+
/// </summary>
|
|
90
|
+
/// <param name="data">The string to update the checksum with</param>
|
|
91
|
+
/// <param name="encoding">The encoding to use</param>
|
|
92
|
+
public void Update(string data, Encoding encoding)
|
|
93
|
+
{
|
|
94
|
+
Update(encoding.GetBytes(data));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
#endregion
|
|
99
|
+
|
|
100
|
+
#region CRC32
|
|
101
|
+
/// <summary>
|
|
102
|
+
/// Implements a CRC32 checksum generator
|
|
103
|
+
/// </summary>
|
|
104
|
+
public sealed class CRC32Checksum : ChecksumGeneratorBase
|
|
105
|
+
{
|
|
106
|
+
#region DLL imports
|
|
107
|
+
|
|
108
|
+
[DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
|
|
109
|
+
private static extern uint crc32(uint crc, int data, uint length);
|
|
110
|
+
|
|
111
|
+
#endregion
|
|
112
|
+
|
|
113
|
+
/// <summary>
|
|
114
|
+
/// Initializes a new instance of the CRC32 checksum generator
|
|
115
|
+
/// </summary>
|
|
116
|
+
public CRC32Checksum() : base() {}
|
|
117
|
+
|
|
118
|
+
/// <summary>
|
|
119
|
+
/// Initializes a new instance of the CRC32 checksum generator with a specified value
|
|
120
|
+
/// </summary>
|
|
121
|
+
/// <param name="initialValue">The value to set the current checksum to</param>
|
|
122
|
+
public CRC32Checksum(uint initialValue) : base(initialValue) {}
|
|
123
|
+
|
|
124
|
+
/// <summary>
|
|
125
|
+
/// Updates the current checksum with part of an array of bytes
|
|
126
|
+
/// </summary>
|
|
127
|
+
/// <param name="data">The data to update the checksum with</param>
|
|
128
|
+
/// <param name="offset">Where in <c>data</c> to start updating</param>
|
|
129
|
+
/// <param name="count">The number of bytes from <c>data</c> to use</param>
|
|
130
|
+
/// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
|
|
131
|
+
/// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
|
|
132
|
+
/// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
|
|
133
|
+
public override void Update(byte[] data, int offset, int count)
|
|
134
|
+
{
|
|
135
|
+
if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
|
|
136
|
+
if ((offset+count) > data.Length) throw new ArgumentException();
|
|
137
|
+
GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
|
|
138
|
+
try
|
|
139
|
+
{
|
|
140
|
+
_current = crc32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
|
|
141
|
+
}
|
|
142
|
+
finally
|
|
143
|
+
{
|
|
144
|
+
hData.Free();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
}
|
|
149
|
+
#endregion
|
|
150
|
+
|
|
151
|
+
#region Adler
|
|
152
|
+
/// <summary>
|
|
153
|
+
/// Implements a checksum generator that computes the Adler checksum on data
|
|
154
|
+
/// </summary>
|
|
155
|
+
public sealed class AdlerChecksum : ChecksumGeneratorBase
|
|
156
|
+
{
|
|
157
|
+
#region DLL imports
|
|
158
|
+
|
|
159
|
+
[DllImport("ZLIB1.dll", CallingConvention=CallingConvention.Cdecl)]
|
|
160
|
+
private static extern uint adler32(uint adler, int data, uint length);
|
|
161
|
+
|
|
162
|
+
#endregion
|
|
163
|
+
|
|
164
|
+
/// <summary>
|
|
165
|
+
/// Initializes a new instance of the Adler checksum generator
|
|
166
|
+
/// </summary>
|
|
167
|
+
public AdlerChecksum() : base() {}
|
|
168
|
+
|
|
169
|
+
/// <summary>
|
|
170
|
+
/// Initializes a new instance of the Adler checksum generator with a specified value
|
|
171
|
+
/// </summary>
|
|
172
|
+
/// <param name="initialValue">The value to set the current checksum to</param>
|
|
173
|
+
public AdlerChecksum(uint initialValue) : base(initialValue) {}
|
|
174
|
+
|
|
175
|
+
/// <summary>
|
|
176
|
+
/// Updates the current checksum with part of an array of bytes
|
|
177
|
+
/// </summary>
|
|
178
|
+
/// <param name="data">The data to update the checksum with</param>
|
|
179
|
+
/// <param name="offset">Where in <c>data</c> to start updating</param>
|
|
180
|
+
/// <param name="count">The number of bytes from <c>data</c> to use</param>
|
|
181
|
+
/// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>
|
|
182
|
+
/// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
|
|
183
|
+
/// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
|
|
184
|
+
public override void Update(byte[] data, int offset, int count)
|
|
185
|
+
{
|
|
186
|
+
if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();
|
|
187
|
+
if ((offset+count) > data.Length) throw new ArgumentException();
|
|
188
|
+
GCHandle hData = GCHandle.Alloc(data, GCHandleType.Pinned);
|
|
189
|
+
try
|
|
190
|
+
{
|
|
191
|
+
_current = adler32(_current, hData.AddrOfPinnedObject().ToInt32()+offset, (uint)count);
|
|
192
|
+
}
|
|
193
|
+
finally
|
|
194
|
+
{
|
|
195
|
+
hData.Free();
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
}
|
|
200
|
+
#endregion
|
|
201
|
+
|
|
202
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
//
|
|
2
|
+
// � Copyright Henrik Ravn 2004
|
|
3
|
+
//
|
|
4
|
+
// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
|
|
5
|
+
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
using System;
|
|
9
|
+
using System.Diagnostics;
|
|
10
|
+
|
|
11
|
+
namespace DotZLib
|
|
12
|
+
{
|
|
13
|
+
|
|
14
|
+
/// <summary>
|
|
15
|
+
/// This class implements a circular buffer
|
|
16
|
+
/// </summary>
|
|
17
|
+
internal class CircularBuffer
|
|
18
|
+
{
|
|
19
|
+
#region Private data
|
|
20
|
+
private int _capacity;
|
|
21
|
+
private int _head;
|
|
22
|
+
private int _tail;
|
|
23
|
+
private int _size;
|
|
24
|
+
private byte[] _buffer;
|
|
25
|
+
#endregion
|
|
26
|
+
|
|
27
|
+
public CircularBuffer(int capacity)
|
|
28
|
+
{
|
|
29
|
+
Debug.Assert( capacity > 0 );
|
|
30
|
+
_buffer = new byte[capacity];
|
|
31
|
+
_capacity = capacity;
|
|
32
|
+
_head = 0;
|
|
33
|
+
_tail = 0;
|
|
34
|
+
_size = 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public int Size { get { return _size; } }
|
|
38
|
+
|
|
39
|
+
public int Put(byte[] source, int offset, int count)
|
|
40
|
+
{
|
|
41
|
+
Debug.Assert( count > 0 );
|
|
42
|
+
int trueCount = Math.Min(count, _capacity - Size);
|
|
43
|
+
for (int i = 0; i < trueCount; ++i)
|
|
44
|
+
_buffer[(_tail+i) % _capacity] = source[offset+i];
|
|
45
|
+
_tail += trueCount;
|
|
46
|
+
_tail %= _capacity;
|
|
47
|
+
_size += trueCount;
|
|
48
|
+
return trueCount;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public bool Put(byte b)
|
|
52
|
+
{
|
|
53
|
+
if (Size == _capacity) // no room
|
|
54
|
+
return false;
|
|
55
|
+
_buffer[_tail++] = b;
|
|
56
|
+
_tail %= _capacity;
|
|
57
|
+
++_size;
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public int Get(byte[] destination, int offset, int count)
|
|
62
|
+
{
|
|
63
|
+
int trueCount = Math.Min(count,Size);
|
|
64
|
+
for (int i = 0; i < trueCount; ++i)
|
|
65
|
+
destination[offset + i] = _buffer[(_head+i) % _capacity];
|
|
66
|
+
_head += trueCount;
|
|
67
|
+
_head %= _capacity;
|
|
68
|
+
_size -= trueCount;
|
|
69
|
+
return trueCount;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
public int Get()
|
|
73
|
+
{
|
|
74
|
+
if (Size == 0)
|
|
75
|
+
return -1;
|
|
76
|
+
|
|
77
|
+
int result = (int)_buffer[_head++ % _capacity];
|
|
78
|
+
--_size;
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
//
|
|
2
|
+
// � Copyright Henrik Ravn 2004
|
|
3
|
+
//
|
|
4
|
+
// Use, modification and distribution are subject to the Boost Software License, Version 1.0.
|
|
5
|
+
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
using System;
|
|
9
|
+
using System.Runtime.InteropServices;
|
|
10
|
+
|
|
11
|
+
namespace DotZLib
|
|
12
|
+
{
|
|
13
|
+
/// <summary>
|
|
14
|
+
/// Implements the common functionality needed for all <see cref="Codec"/>s
|
|
15
|
+
/// </summary>
|
|
16
|
+
public abstract class CodecBase : Codec, IDisposable
|
|
17
|
+
{
|
|
18
|
+
|
|
19
|
+
#region Data members
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
/// Instance of the internal zlib buffer structure that is
|
|
23
|
+
/// passed to all functions in the zlib dll
|
|
24
|
+
/// </summary>
|
|
25
|
+
internal ZStream _ztream = new ZStream();
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
/// True if the object instance has been disposed, false otherwise
|
|
29
|
+
/// </summary>
|
|
30
|
+
protected bool _isDisposed = false;
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
/// The size of the internal buffers
|
|
34
|
+
/// </summary>
|
|
35
|
+
protected const int kBufferSize = 16384;
|
|
36
|
+
|
|
37
|
+
private byte[] _outBuffer = new byte[kBufferSize];
|
|
38
|
+
private byte[] _inBuffer = new byte[kBufferSize];
|
|
39
|
+
|
|
40
|
+
private GCHandle _hInput;
|
|
41
|
+
private GCHandle _hOutput;
|
|
42
|
+
|
|
43
|
+
private uint _checksum = 0;
|
|
44
|
+
|
|
45
|
+
#endregion
|
|
46
|
+
|
|
47
|
+
/// <summary>
|
|
48
|
+
/// Initializes a new instance of the <c>CodeBase</c> class.
|
|
49
|
+
/// </summary>
|
|
50
|
+
public CodecBase()
|
|
51
|
+
{
|
|
52
|
+
try
|
|
53
|
+
{
|
|
54
|
+
_hInput = GCHandle.Alloc(_inBuffer, GCHandleType.Pinned);
|
|
55
|
+
_hOutput = GCHandle.Alloc(_outBuffer, GCHandleType.Pinned);
|
|
56
|
+
}
|
|
57
|
+
catch (Exception)
|
|
58
|
+
{
|
|
59
|
+
CleanUp(false);
|
|
60
|
+
throw;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
#region Codec Members
|
|
66
|
+
|
|
67
|
+
/// <summary>
|
|
68
|
+
/// Occurs when more processed data are available.
|
|
69
|
+
/// </summary>
|
|
70
|
+
public event DataAvailableHandler DataAvailable;
|
|
71
|
+
|
|
72
|
+
/// <summary>
|
|
73
|
+
/// Fires the <see cref="DataAvailable"/> event
|
|
74
|
+
/// </summary>
|
|
75
|
+
protected void OnDataAvailable()
|
|
76
|
+
{
|
|
77
|
+
if (_ztream.total_out > 0)
|
|
78
|
+
{
|
|
79
|
+
if (DataAvailable != null)
|
|
80
|
+
DataAvailable( _outBuffer, 0, (int)_ztream.total_out);
|
|
81
|
+
resetOutput();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/// <summary>
|
|
86
|
+
/// Adds more data to the codec to be processed.
|
|
87
|
+
/// </summary>
|
|
88
|
+
/// <param name="data">Byte array containing the data to be added to the codec</param>
|
|
89
|
+
/// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
|
|
90
|
+
public void Add(byte[] data)
|
|
91
|
+
{
|
|
92
|
+
Add(data,0,data.Length);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/// <summary>
|
|
96
|
+
/// Adds more data to the codec to be processed.
|
|
97
|
+
/// </summary>
|
|
98
|
+
/// <param name="data">Byte array containing the data to be added to the codec</param>
|
|
99
|
+
/// <param name="offset">The index of the first byte to add from <c>data</c></param>
|
|
100
|
+
/// <param name="count">The number of bytes to add</param>
|
|
101
|
+
/// <remarks>Adding data may, or may not, raise the <c>DataAvailable</c> event</remarks>
|
|
102
|
+
/// <remarks>This must be implemented by a derived class</remarks>
|
|
103
|
+
public abstract void Add(byte[] data, int offset, int count);
|
|
104
|
+
|
|
105
|
+
/// <summary>
|
|
106
|
+
/// Finishes up any pending data that needs to be processed and handled.
|
|
107
|
+
/// </summary>
|
|
108
|
+
/// <remarks>This must be implemented by a derived class</remarks>
|
|
109
|
+
public abstract void Finish();
|
|
110
|
+
|
|
111
|
+
/// <summary>
|
|
112
|
+
/// Gets the checksum of the data that has been added so far
|
|
113
|
+
/// </summary>
|
|
114
|
+
public uint Checksum { get { return _checksum; } }
|
|
115
|
+
|
|
116
|
+
#endregion
|
|
117
|
+
|
|
118
|
+
#region Destructor & IDisposable stuff
|
|
119
|
+
|
|
120
|
+
/// <summary>
|
|
121
|
+
/// Destroys this instance
|
|
122
|
+
/// </summary>
|
|
123
|
+
~CodecBase()
|
|
124
|
+
{
|
|
125
|
+
CleanUp(false);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/// <summary>
|
|
129
|
+
/// Releases any unmanaged resources and calls the <see cref="CleanUp()"/> method of the derived class
|
|
130
|
+
/// </summary>
|
|
131
|
+
public void Dispose()
|
|
132
|
+
{
|
|
133
|
+
CleanUp(true);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/// <summary>
|
|
137
|
+
/// Performs any codec specific cleanup
|
|
138
|
+
/// </summary>
|
|
139
|
+
/// <remarks>This must be implemented by a derived class</remarks>
|
|
140
|
+
protected abstract void CleanUp();
|
|
141
|
+
|
|
142
|
+
// performs the release of the handles and calls the derived CleanUp()
|
|
143
|
+
private void CleanUp(bool isDisposing)
|
|
144
|
+
{
|
|
145
|
+
if (!_isDisposed)
|
|
146
|
+
{
|
|
147
|
+
CleanUp();
|
|
148
|
+
if (_hInput.IsAllocated)
|
|
149
|
+
_hInput.Free();
|
|
150
|
+
if (_hOutput.IsAllocated)
|
|
151
|
+
_hOutput.Free();
|
|
152
|
+
|
|
153
|
+
_isDisposed = true;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
#endregion
|
|
159
|
+
|
|
160
|
+
#region Helper methods
|
|
161
|
+
|
|
162
|
+
/// <summary>
|
|
163
|
+
/// Copies a number of bytes to the internal codec buffer - ready for processing
|
|
164
|
+
/// </summary>
|
|
165
|
+
/// <param name="data">The byte array that contains the data to copy</param>
|
|
166
|
+
/// <param name="startIndex">The index of the first byte to copy</param>
|
|
167
|
+
/// <param name="count">The number of bytes to copy from <c>data</c></param>
|
|
168
|
+
protected void copyInput(byte[] data, int startIndex, int count)
|
|
169
|
+
{
|
|
170
|
+
Array.Copy(data, startIndex, _inBuffer,0, count);
|
|
171
|
+
_ztream.next_in = _hInput.AddrOfPinnedObject();
|
|
172
|
+
_ztream.total_in = 0;
|
|
173
|
+
_ztream.avail_in = (uint)count;
|
|
174
|
+
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/// <summary>
|
|
178
|
+
/// Resets the internal output buffers to a known state - ready for processing
|
|
179
|
+
/// </summary>
|
|
180
|
+
protected void resetOutput()
|
|
181
|
+
{
|
|
182
|
+
_ztream.total_out = 0;
|
|
183
|
+
_ztream.avail_out = kBufferSize;
|
|
184
|
+
_ztream.next_out = _hOutput.AddrOfPinnedObject();
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/// <summary>
|
|
188
|
+
/// Updates the running checksum property
|
|
189
|
+
/// </summary>
|
|
190
|
+
/// <param name="newSum">The new checksum value</param>
|
|
191
|
+
protected void setChecksum(uint newSum)
|
|
192
|
+
{
|
|
193
|
+
_checksum = newSum;
|
|
194
|
+
}
|
|
195
|
+
#endregion
|
|
196
|
+
|
|
197
|
+
}
|
|
198
|
+
}
|