By default CsCrypto will search for both the Botan and OpenSSL libraries. Currently, the examples will only work if both libraries are available.
- To disable Botan pass the following on your CMake command line or CMake script.
- To disable OpenSSL pass the following on your CMake command line or CMake script.
Installing Botan or OpenSSL
The following is a partial list of package names.
- Arch
- botan (Botan)
- openssl (OpenSSL)
- Debian
- libbotan-2-dev (Botan)
- libssl-dev (OpenSSL)
- Fedora
- botan2 (Botan)
- openssl (OpenSSL)
- Ubuntu
- libbotan-2-dev (Botan)
- libssl-dev (OpenSSL)
Using Crypto
There are two ways to use the CsCrypto project. Currently CsCrypto is header only however this may change in later versions.
- Include files by hand
- Copy the CsCrypto files into your project folder
- Modify your build files to include the CsCrypto files
- Preferred approach
- Build and install CsCrypto
- Modify your build file as shown below
Sample Project File
The following is a sample CMake file which shows how to specify CsCrypto in your application. The find_package()
and target_link_libraries()
must be added exactly as shown.
project(myApp)
add_executable(myApp
main.cpp
)
find_package(CsCrypto REQUIRED COMPONENTS Crypto Drivers)
target_link_libraries(myApp
CsCrypto::Crypto
CsCrypto::Drivers
)