#pragma once #include #include #include #include #include #include "RsaPrivateKey.hpp" #include "RsaPublicKey.hpp" namespace drp::util::crypto { /** * Represent a pair of RSA key. */ class RsaKeyPair { public: /** * Generate a pair of public and private RSA keys. */ explicit RsaKeyPair(std::size_t size, int padMode = RSA_PKCS1_OAEP_PADDING); /** * Get the public key. * @return the public key. */ [[nodiscard]] RsaPublicKey getPublicKey() const; /** * Get the private key. * @return the private key. */ [[nodiscard]] RsaPrivateKey getPrivateKey() const; private: RsaPrivateKey privateKey; RsaPublicKey publicKey; }; }