10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
LibcryptoKeyFactory.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/PublicKeyFactory.h"
7#include "utl/BinaryData.h"
8
9#include <memory>
10
11namespace tenduke { namespace crypto { namespace libcrypto {
12
17
18// `tenduke::crypto::PublicKeyFactory` interface
19public:
20 std::unique_ptr<tenduke::crypto::PublicKey> publicKeyFromPEM(const char * publicKeyAsPEM) const override;
21 std::unique_ptr<tenduke::crypto::PublicKey> publicKeyFromPEM(const std::string &publicKeyAsPEM) const override;
22 std::unique_ptr<tenduke::crypto::PublicKey> publicRSAKeyFromModuloAndExponent(
23 const tenduke::utl::BinaryData &modulo,
24 const tenduke::utl::BinaryData &exponent
25 ) const override;
26
27public:
33 virtual std::unique_ptr<::tenduke::crypto::PrivateKey> privateKeyFromPEM(const std::string &privateKeyAsPEM) const;
34};
35
36}}}
37
38#endif //TENDUKE_CRYPTO_LIBCRYPTO_LIBCRYPTORSAKEYFACTORY_H
Creates cryptographical public keys.
Definition PublicKeyFactory.h:16
Libcrypto implementation of tenduke::crypto::PublicKeyFactory.
Definition LibcryptoKeyFactory.h:16
std::unique_ptr< tenduke::crypto::PublicKey > publicRSAKeyFromModuloAndExponent(const tenduke::utl::BinaryData &modulo, const tenduke::utl::BinaryData &exponent) const override
Creates a RSA tenduke::crypto::PublicKey from modulo and exponent.
std::unique_ptr< tenduke::crypto::PublicKey > publicKeyFromPEM(const char *publicKeyAsPEM) const override
Creates a tenduke::crypto::PublicKey from PEM.
Definition LibcryptoRSAKeyFactory.cpp:83
virtual std::unique_ptr<::tenduke::crypto::PrivateKey > privateKeyFromPEM(const std::string &privateKeyAsPEM) const
Creates private key from given PEM.
std::unique_ptr< tenduke::crypto::PublicKey > publicKeyFromPEM(const std::string &publicKeyAsPEM) const override
Creates a tenduke::crypto::PublicKey from PEM.
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 APIRequest.h:4