A encryption/decryption library for CDoc container format.
- CDoc1 encryption by certificate (RSA/ECC)
- CDoc1 decryption (PKSC11/NCrypt private key)
- CDoc2 encryption by public key (RSA/ECC)
- CDoc2 decryption by private key (PKSC11/NCrypt)
- CDoc2 key-server support
- CDoc2 symmetric encryption (AES)
- CDoc2 symmetric encryption (password-based)
For more information refer doc/intro.md document.
-
Install dependencies
# Ubuntu sudo apt install cmake libxml2-dev zlib1g-dev # Fedora sudo dnf install cmake gcc-c++ libtool-ltdl-devel libxml2-devel openssl-devel zlib-devel
- flatbuffers - required
- doxygen - Optional, for API documentation
- libboost-test-dev - Optional, for unit tests
- swig - Optional, for C# and Java bindings
- openjdk-17-jdk-headless - Optional, for Java bindings
-
Fetch the source
git clone https://github.com/open-eid/libcdoc.git cd libcdoc
-
Configure
cmake -B build -S .
-
Build
cmake --build build
-
Install
sudo cmake --build build --target install
-
Install dependencies from
-
Fetch the source
git clone https://github.com/open-eid/libcdoc.git cd libdcdoc
-
Install dependencies
brew install flatbuffers openssl opensc
- flatbuffers - Required
- openssl - Required, version 3.0.0 or later
- opensc - Optional, for smart-card operations
- doxygen - Optional, for API documentation
- boost - Optional, for unit tests
- swig - Optional, for C# and Java bindings
- openjdk - Optional, for Java bindings
-
Configure
cmake -B build -S .
-
Build
cmake --build build
-
Install
sudo cmake --build build --target install
-
Install dependencies and necessary tools from
- Visual Studio Community 2022
- CMake
- vcpkg
- Swig - Optional, for C#, Python and Java bindings
- Doxygen - Optional, for generating documentation
- Wix toolset - Optional, for creating Windows installation packages
- Python - Optional, for Python bindings
- Java - Optional, for Java bindings
-
Open desired Visual Studio tools command prompt:
- x64 Native Tool Command Prompt
- x86 Native Tool Command Prompt
- ARM64 Native Tool Command Prompt
- Or some cross compile combination with target host type
-
Fetch the source
git clone https://github.com/open-eid/libcdoc.git cd libcdoc
-
Configure and Build
.\build.ps1