CsCrypto  1.0.1
Using CsCrypto

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.
    -DENABLE_BOTAN=OFF
  • To disable OpenSSL pass the following on your CMake command line or CMake script.
    -DENABLE_OPENSSL=OFF

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.

# part of your existing CMake file
project(myApp)
# part of your existing CMake file
add_executable(myApp
main.cpp
)
find_package(CsCrypto REQUIRED COMPONENTS Crypto Drivers)
target_link_libraries(myApp
CsCrypto::Crypto
CsCrypto::Drivers
)