EasySSL

EasySSL - Simple OpenSSL wrapper for C++ Qt projects

EasySSL is a Qt wrapper of the OpenSSL 3.0+ library that makes working with the asymmetric cryptography simple: RSA and ECDSA encryption and signing, key generation, self-signed X509 certificates and asynchronous authentication.

Read the Documentation Get it on GitHub

API Reference

Complete reference of the EasySSL classes (RSASSL, ECDSASSL, X509, AuthECDSA, ...), generated automatically with Doxygen.

Open API Reference →

Features

Build Options

Repository

Quick example

Create the RSA keys, encrypt and decrypt the data and check the signature:

#include <easyssl/rsassl.h>
#include <QByteArray>

int main() {
    // create a public and private keys array.
    EasySSL::RSASSL crypto;
    QByteArray pub, priv;
    crypto.makeKeys(pub, priv);

    QByteArray message = "Hello EasySSL!";

    auto signature = crypto.signMessage(message, priv);
    crypto.checkSign(message, signature, pub);

    auto encryptedMsg = crypto.encrypt(message, pub);
    auto decryptedMsg = crypto.decrypt(encryptedMsg, priv);
}

Build with CMake

Add the repository as a submodule and include it in your CMakeLists.txt. To build without the system OpenSSL library, set the BUILD_WITH_OPENSSL option:

# add the repository of EasySSL into your repo like submodule
git submodule add https://github.com/QuasarApp/easyssl.git
git submodule update --init --recursive

# CMakeLists.txt
add_subdirectory(easyssl)
target_link_libraries(yourLib PUBLIC easyssl)

# build without the system OpenSSL 3.0+ library
cmake .. -DBUILD_WITH_OPENSSL=1