10Duke Scale C++ Client
Loading...
Searching...
No Matches
LibcryptoRSAKeyFactory.h
1#ifndef TENDUKE_CRYPTO_LIBCRYPTO_LIBCRYPTORSAKEYFACTORY_H
2#define TENDUKE_CRYPTO_LIBCRYPTO_LIBCRYPTORSAKEYFACTORY_H
3
4#include "crypto/PrivateKey.h"
5#include "crypto/PublicKey.h"
6#include "crypto/RSAKeyFactory.h"
7#include "utl/BinaryData.h"
8
9#include <memory>
10
11namespace tenduke { namespace crypto { namespace libcrypto {
12
17
18// `tenduke::crypto::RSAKeyFactory` interface
19public:
20 std::unique_ptr<tenduke::crypto::PublicKey> publicKeyFromPEM(const std::string &publicKeyAsPEM) const override;
21 std::unique_ptr<tenduke::crypto::PublicKey> publicKeyFromModuloAndExponent(
22 const tenduke::utl::BinaryData &modulo,
23 const tenduke::utl::BinaryData &exponent
24 ) const override;
25
26public:
32 virtual std::unique_ptr<::tenduke::crypto::PrivateKey> privateKeyFromPEM(const std::string &privateKeyAsPEM) const;
33};
34
35}}}
36
37#endif //TENDUKE_CRYPTO_LIBCRYPTO_LIBCRYPTORSAKEYFACTORY_H
Definition RSAKeyFactory.h:11
Libcrypto implementation of tenduke::crypto::RSAKeyFactory.
Definition LibcryptoRSAKeyFactory.h:16
virtual std::unique_ptr<::tenduke::crypto::PrivateKey > privateKeyFromPEM(const std::string &privateKeyAsPEM) const
Creates RSA private key from given PEM.
Definition LibcryptoRSAKeyFactory.cpp:83
std::unique_ptr< tenduke::crypto::PublicKey > publicKeyFromPEM(const std::string &publicKeyAsPEM) const override
Creates a tenduke::crypto::PublicKey from PEM.
Definition LibcryptoRSAKeyFactory.cpp:47
std::unique_ptr< tenduke::crypto::PublicKey > publicKeyFromModuloAndExponent(const tenduke::utl::BinaryData &modulo, const tenduke::utl::BinaryData &exponent) const override
Creates a RSA tenduke::crypto::PublicKey from modulo and exponent.
Definition LibcryptoRSAKeyFactory.cpp:119
A holder of binary data.
Definition BinaryData.h:13
libcrypto based implementations of cryptography services.
Definition AsymmetricMessageDigest.h:15
Cryptography services.
Definition CryptoException.h:7
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7