- 64-bit Windows Visual Studio 2012 or later
- gcc 4.6, clang 3.0 or later
- libssl
sudo apt install libssl-dev
Linux / MacOS
mkdir work
git clone https://github.com/herumi/cybozulib
git clone https://github.com/herumi/msoffice
cd msoffice
make -j RELEASE=1
Windows
mkdir work
git clone https://github.com/herumi/cybozulib
git clone https://github.com/herumi/msoffice
git clone https://github.com/herumi/cybozulib_ext # for openssl
cd msoffice
mk.bat ; or open msoffice12.sln and build
- Encrypt test.xlsx with a password
test
.
bin/msoffice-crypt.exe -e -p test test.xlsx enc.xlsx
- Decrypt enc.xlsx with a password
test
.
bin/msoffice-crypt.exe -d -p test enc.xlsx dec.xlsx
Office 2010 or later Office Document format which suffix is pptx, docx, xlsx.
MSOC_encrypt(outFile, inFile, pass, NULL);
- Decrypt
inFile
withpass
and makeoutFile
.
MSOC_decrypt(outFile, inFile, pass, NULL);
- libmsoc.lib
BSD 3-Clause License
Copyright (c) 2015 Cybozu Labs, Inc. All rights reserved.
-
Compound File Binary File Format(v20120328) [MS-CFB]
-
Office Document Cryptography Structure Specification(v20120412) [MS-OFFCRYPTO]
-
CODE BLUE 2015 [Backdoors with the MS Office file encryption master key and a proposal for a reliable file format]
-
99.9% built by herumi <3