10Duke Enterprise C++ SDK
Loading...
Searching...
No Matches
LibcryptoPublicKey.h
1#ifndef TENDUKE_CRYPTO_LIBCRYPTO_LIBCRYPTOPUBLICKEY_H
2#define TENDUKE_CRYPTO_LIBCRYPTO_LIBCRYPTOPUBLICKEY_H
3
4#include "./LibcryptoKey.h"
5#include "crypto/asymmetric/PublicKey.h"
6
7#include <string>
8
9#include <openssl/evp.h>
10
11namespace tenduke { namespace crypto { namespace libcrypto {
12
13
18{
19public:
26 EVP_PKEY * key,
27 std::string type
28 );
29
30 // `tenduke::crypto::PublicKey` interface
31public:
32 std::unique_ptr<::tenduke::crypto::DigitalSignatureVerifier> createSignatureVerifier(::tenduke::crypto::HashAlgorithm digestAlgorithm) const override;
33 std::string toPEM() const override;
34};
35
36
37}}}
38
39#endif // TENDUKE_CRYPTO_LIBCRYPTO_LIBCRYPTOPUBLICKEY_H
Public key.
Definition PublicKey.h:16
Base class for public and private keys.
Definition LibcryptoKey.h:15
EVP_PKEY * key
libcurl handle for the key.
Definition LibcryptoKey.h:45
const std::string type
Type of the key.
Definition LibcryptoKey.h:43
std::string toPEM() const override
Generates PEM-representation of this key.
Definition LibcryptoPublicKey.cpp:37
std::unique_ptr<::tenduke::crypto::DigitalSignatureVerifier > createSignatureVerifier(::tenduke::crypto::HashAlgorithm digestAlgorithm) const override
Creates a tenduke::crypto::MessageDigestVerifier, which uses this key and given algorithm.
Definition LibcryptoPublicKey.cpp:29
LibcryptoPublicKey(EVP_PKEY *key, std::string type)
Constructs a new instance.
Definition LibcryptoPublicKey.cpp:21
libcrypto based implementations of cryptography services.
Definition LibcryptoKey.h:8
Cryptography services.
Definition AbstractCiphers.h:18
HashAlgorithm
Currently supported hash algorithms.
Definition HashAlgorithm.h:13
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4