//SPDX-License-Identifier: LGPL-3.0-only //SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts® module; #ifdef NOSTRO_OPENSSL_ENABLED #include #include #endif export module Nostro:Crypto; #ifdef NOSTRO_OPENSSL_ENABLED import std; export namespace Nostro::Crypto { long ThrowOnOpenssl(long status); template T* ThrowOnOpenssl(T* pointer) { if(pointer == nullptr) { ERR_print_errors_fp(stderr); throw std::runtime_error("openssl error"); } return pointer; } std::string SignBody(EVP_PKEY* privateKey, std::string_view body); std::tuple CreateKey(); EVP_PKEY* LoadKeyFromPem(std::string_view pem); }; #endif