ooxml_crypt 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/lib/ooxml_crypt/version.rb +1 -1
- data/vendor/cybozulib/common.mk +3 -3
- data/vendor/cybozulib/common.props +1 -1
- data/vendor/cybozulib/debug.props +1 -1
- data/vendor/cybozulib/include/cybozu/atomic.hpp +15 -5
- data/vendor/cybozulib/include/cybozu/bfd.hpp +1 -1
- data/vendor/cybozulib/include/cybozu/bit_operation.hpp +8 -10
- data/vendor/cybozulib/include/cybozu/crypto.hpp +59 -5
- data/vendor/cybozulib/include/cybozu/endian.hpp +0 -2
- data/vendor/cybozulib/include/cybozu/inttype.hpp +17 -3
- data/vendor/cybozulib/include/cybozu/link_libeay32.hpp +1 -1
- data/vendor/cybozulib/include/cybozu/link_mpir.hpp +1 -1
- data/vendor/cybozulib/include/cybozu/link_ssleay32.hpp +1 -1
- data/vendor/cybozulib/include/cybozu/random_generator.hpp +1 -0
- data/vendor/cybozulib/include/cybozu/sha2.hpp +102 -0
- data/vendor/cybozulib/sample/proj/ssl_smpl/ssl_smpl.vcxproj +1 -1
- data/vendor/cybozulib/sample/proj/stacktrace_smpl/stacktrace_smpl.vcxproj +1 -1
- data/vendor/cybozulib/test/Makefile +3 -3
- data/vendor/cybozulib/test/base/proj/array_test/array_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/atoi_test/atoi_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/atomic_test/atomic_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/base64_test/base64_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/condition_variable_cs_test/condition_variable_cs_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/condition_variable_test/condition_variable_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/config_test/config_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/csv_test/csv_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/endian_test/endian_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/env_test/env_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/event_test/event_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/file_test/file_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/itoa_test/itoa_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/mecab_test/mecab_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/minixml_test/minixml_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/mmap_test/mmap_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/serializer_test/serializer_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/sha1_test/sha1_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/stream_test/stream_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/string_operation_test/string_operation_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/string_test/string_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/thread_test/thread_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/time_test/time_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/tls_test/tls_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/proj/zlib_test/zlib_test.vcxproj +1 -1
- data/vendor/cybozulib/test/base/sha2_test.cpp +1 -1
- data/vendor/cybozulib/test/base/zlib_test.cpp +2 -0
- data/vendor/msoffice/Makefile +2 -2
- data/vendor/msoffice/bin/msoffice-crypt.exe +0 -0
- data/vendor/msoffice/common.mk +11 -6
- data/vendor/msoffice/common.props +25 -25
- data/vendor/msoffice/debug.props +13 -13
- data/vendor/msoffice/include/crypto_util.hpp +454 -450
- data/vendor/msoffice/readme.md +2 -0
- data/vendor/msoffice/release.props +27 -27
- data/vendor/msoffice/test/Makefile +4 -1
- data/vendor/msoffice/test/proj/cfb/cfb_test.vcxproj +89 -89
- data/vendor/msoffice/test/proj/hash/hash_test.vcxproj +89 -89
- data/vendor/msoffice/test_all.py +4 -4
- metadata +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|Win32">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
2
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
3
|
<ItemGroup Label="ProjectConfigurations">
|
|
4
4
|
<ProjectConfiguration Include="Debug|x64">
|
|
@@ -184,6 +184,7 @@ void compareMap(const Map& x, const Map& y)
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
#if 0
|
|
187
188
|
CYBOZU_TEST_AUTO(serializer_with_zlib)
|
|
188
189
|
{
|
|
189
190
|
typedef std::map<int, double> Map;
|
|
@@ -252,6 +253,7 @@ CYBOZU_TEST_AUTO(sparse_with_zlib)
|
|
|
252
253
|
CYBOZU_TEST_ASSERT(yi == y.end());
|
|
253
254
|
}
|
|
254
255
|
}
|
|
256
|
+
#endif
|
|
255
257
|
|
|
256
258
|
CYBOZU_TEST_AUTO(random)
|
|
257
259
|
{
|
data/vendor/msoffice/Makefile
CHANGED
|
@@ -9,7 +9,7 @@ all:
|
|
|
9
9
|
$(MAKE) $(MSOC_SLIB)
|
|
10
10
|
|
|
11
11
|
test:
|
|
12
|
-
|
|
12
|
+
python3 test_all.py
|
|
13
13
|
clean:
|
|
14
14
|
$(MAKE) -C src clean
|
|
15
15
|
$(MAKE) -C test clean
|
|
@@ -25,5 +25,5 @@ $(MSOC_SLIB): src/$(OBJDIR)/msocdll.o
|
|
|
25
25
|
$(CXX) -o $@ $< -shared $(LDFLAGS)
|
|
26
26
|
|
|
27
27
|
bin/minisample: src/minisample.c include/msoc.h $(MSOC_LIB)
|
|
28
|
-
$(CC) $< -o $@ $(MSOC_LIB) -lstdc++ -lcrypto -Iinclude -Wall -Wextra
|
|
28
|
+
$(CC) $< -o $@ $(MSOC_LIB) -lstdc++ -lcrypto -Iinclude -Wall -Wextra
|
|
29
29
|
|
|
Binary file
|
data/vendor/msoffice/common.mk
CHANGED
|
@@ -2,16 +2,21 @@ CP = cp -f
|
|
|
2
2
|
AR = ar r
|
|
3
3
|
MKDIR=mkdir -p
|
|
4
4
|
RM=rm -fr
|
|
5
|
-
CFLAGS_OPT = -
|
|
5
|
+
CFLAGS_OPT = -O2 -DNDEBUG
|
|
6
6
|
#CFLAGS_WARN=-Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wfloat-equal -Wpointer-arith #-Wswitch-enum -Wstrict-aliasing=2
|
|
7
7
|
CFLAGS_WARN=-Wall -Wextra -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wfloat-equal -Wpointer-arith #-Wswitch-enum -Wstrict-aliasing=2
|
|
8
|
-
CFLAGS = -g -D_FILE_OFFSET_BITS=64
|
|
8
|
+
CFLAGS = -g -D_FILE_OFFSET_BITS=64
|
|
9
9
|
CFLAGS+=$(CFLAGS_WARN)
|
|
10
|
-
|
|
10
|
+
ifeq ($(OLD_OPENSSL),1)
|
|
11
|
+
CFLAGS+=-DCYBOZU_USE_OPENSSL_NEW_HASH=0
|
|
12
|
+
endif
|
|
13
|
+
|
|
14
|
+
LDFLAGS = -lcrypto
|
|
11
15
|
UNAME_S=$(shell uname -s)
|
|
12
16
|
ifeq ($(UNAME_S),Darwin)
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
EXT_DIR?=/opt/homebrew/
|
|
18
|
+
CFLAGS+=-I$(EXT_DIR)/include
|
|
19
|
+
LDFLAGS+=-L$(EXT_DIR)/lib
|
|
15
20
|
LIB_SUF=dylib
|
|
16
21
|
else
|
|
17
22
|
LIB_SUF=so
|
|
@@ -32,7 +37,7 @@ else
|
|
|
32
37
|
endif
|
|
33
38
|
|
|
34
39
|
TOPDIR:=$(realpath $(dir $(lastword $(MAKEFILE_LIST))))/
|
|
35
|
-
CFLAGS+= -I$(TOPDIR)include -I$(TOPDIR)../cybozulib/include
|
|
40
|
+
CFLAGS+= -I$(TOPDIR)include -I$(TOPDIR)../cybozulib/include
|
|
36
41
|
LDFLAGS+= -L$(TOPDIR)lib -lcrypto -lpthread
|
|
37
42
|
ifneq ($(UNAME_S),Darwin)
|
|
38
43
|
LDFLAGS+=-lrt
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<ImportGroup Label="PropertySheets" />
|
|
4
|
-
<PropertyGroup Label="UserMacros" />
|
|
5
|
-
<PropertyGroup>
|
|
6
|
-
<OutDir>$(SolutionDir)bin\</OutDir>
|
|
7
|
-
</PropertyGroup>
|
|
8
|
-
<ItemDefinitionGroup>
|
|
9
|
-
<ClCompile>
|
|
10
|
-
<AdditionalIncludeDirectories>$(SolutionDir)../xbyak;$(SolutionDir)../cybozulib/include;$(SolutionDir)../cybozulib_ext/openssl/include;$(SolutionDir)../cybozulib_ext/mpir/include;$(SolutionDir)include</AdditionalIncludeDirectories>
|
|
11
|
-
</ClCompile>
|
|
12
|
-
</ItemDefinitionGroup>
|
|
13
|
-
<ItemDefinitionGroup>
|
|
14
|
-
<ClCompile>
|
|
15
|
-
<WarningLevel>Level4</WarningLevel>
|
|
16
|
-
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
17
|
-
<PrecompiledHeaderFile />
|
|
18
|
-
<PrecompiledHeaderOutputFile />
|
|
19
|
-
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NOMINMAX</PreprocessorDefinitions>
|
|
20
|
-
</ClCompile>
|
|
21
|
-
<Link>
|
|
22
|
-
<AdditionalLibraryDirectories>$(SolutionDir)../cybozulib_ext/mpir/lib;$(SolutionDir)../cybozulib_ext/openssl/lib</AdditionalLibraryDirectories>
|
|
23
|
-
</Link>
|
|
24
|
-
</ItemDefinitionGroup>
|
|
25
|
-
<ItemGroup />
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
<ImportGroup Label="PropertySheets" />
|
|
4
|
+
<PropertyGroup Label="UserMacros" />
|
|
5
|
+
<PropertyGroup>
|
|
6
|
+
<OutDir>$(SolutionDir)bin\</OutDir>
|
|
7
|
+
</PropertyGroup>
|
|
8
|
+
<ItemDefinitionGroup>
|
|
9
|
+
<ClCompile>
|
|
10
|
+
<AdditionalIncludeDirectories>$(SolutionDir)../xbyak;$(SolutionDir)../cybozulib/include;$(SolutionDir)../cybozulib_ext/openssl/include;$(SolutionDir)../cybozulib_ext/mpir/include;$(SolutionDir)include</AdditionalIncludeDirectories>
|
|
11
|
+
</ClCompile>
|
|
12
|
+
</ItemDefinitionGroup>
|
|
13
|
+
<ItemDefinitionGroup>
|
|
14
|
+
<ClCompile>
|
|
15
|
+
<WarningLevel>Level4</WarningLevel>
|
|
16
|
+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
|
17
|
+
<PrecompiledHeaderFile />
|
|
18
|
+
<PrecompiledHeaderOutputFile />
|
|
19
|
+
<PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);NOMINMAX</PreprocessorDefinitions>
|
|
20
|
+
</ClCompile>
|
|
21
|
+
<Link>
|
|
22
|
+
<AdditionalLibraryDirectories>$(SolutionDir)../cybozulib_ext/mpir/lib;$(SolutionDir)../cybozulib_ext/openssl/lib</AdditionalLibraryDirectories>
|
|
23
|
+
</Link>
|
|
24
|
+
</ItemDefinitionGroup>
|
|
25
|
+
<ItemGroup />
|
|
26
26
|
</Project>
|
data/vendor/msoffice/debug.props
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
-
<ImportGroup Label="PropertySheets" />
|
|
4
|
-
<PropertyGroup Label="UserMacros" />
|
|
5
|
-
<PropertyGroup>
|
|
6
|
-
<TargetName>$(ProjectName)d</TargetName>
|
|
7
|
-
</PropertyGroup>
|
|
8
|
-
<ItemDefinitionGroup>
|
|
9
|
-
<ClCompile>
|
|
10
|
-
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
|
11
|
-
</ClCompile>
|
|
12
|
-
</ItemDefinitionGroup>
|
|
13
|
-
<ItemGroup />
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
<ImportGroup Label="PropertySheets" />
|
|
4
|
+
<PropertyGroup Label="UserMacros" />
|
|
5
|
+
<PropertyGroup>
|
|
6
|
+
<TargetName>$(ProjectName)d</TargetName>
|
|
7
|
+
</PropertyGroup>
|
|
8
|
+
<ItemDefinitionGroup>
|
|
9
|
+
<ClCompile>
|
|
10
|
+
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
|
11
|
+
</ClCompile>
|
|
12
|
+
</ItemDefinitionGroup>
|
|
13
|
+
<ItemGroup />
|
|
14
14
|
</Project>
|