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
-
Open desired Visual Studio tools command prompt:
- x64 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, build and install
.\build.ps1build.ps1drives thewindowsCMake preset with vcpkg. If neither the-vcpkgparameter nor theVCPKG_ROOTenvironment variable points to a vcpkg checkout, one is cloned automatically. By default it builds the x64 Debug and RelWithDebInfo configurations. Common options:.\build.ps1 -platform arm64 # target ARM64 .\build.ps1 -RunTests # build and run the unit tests .\build.ps1 -installdir C:\libcdoc # install after building .\build.ps1 -generator "Visual Studio 17 2022" # use another CMake generator