37 #ifndef VIRGIL_CRYPTO_VIRGIL_DH_H
38 #define VIRGIL_CRYPTO_VIRGIL_DH_H
40 #include "../VirgilByteArray.h"
44 namespace virgil {
namespace crypto {
inline namespace primitive {
76 return self_->doCalculate(publicKey, privateKey, privateKeyPassword);
91 virtual ~Concept() noexcept = default;
95 struct Model : Concept {
97 explicit Model(Impl impl) : impl_(std::move(impl)) {}
103 return impl_.calculate(publicKey, privateKey, privateKeyPassword);
111 std::shared_ptr<const Concept> self_;
116 #endif //VIRGIL_CRYPTO_VIRGIL_DH_H
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:50
static VirgilOperationDH getDefault()
Return default implementation.
VirgilByteArray calculate(const VirgilByteArray &publicKey, const VirgilByteArray &privateKey, const VirgilByteArray &privateKeyPassword=VirgilByteArray()) const
Compute shared key by using Diffie-Hellman algorithm.
Definition: VirgilOperationDH.h:73
Define proxy interface for the Diffie-Hellman functionality.
Definition: VirgilOperationDH.h:51
VirgilOperationDH(Impl impl)
Captures implementation object.
Definition: VirgilOperationDH.h:63