hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
keypair.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_KEYPAIR_HPP
7 #define IROHA_SHARED_MODEL_KEYPAIR_HPP
8 
12 
13 namespace shared_model {
14  namespace crypto {
15 
19  class Keypair : public interface::ModelPrimitive<Keypair> {
20  public:
23 
24  explicit Keypair(
25  shared_model::interface::types::PublicKeyHexStringView public_key_hex,
26  const PrivateKeyType &private_key);
27 
31  std::string const &publicKey() const;
32 
36  const PrivateKeyType &privateKey() const;
37 
38  bool operator==(const Keypair &keypair) const override;
39 
40  std::string toString() const override;
41 
42  private:
43  std::string public_key_hex_;
44  PrivateKey private_key_;
45  };
46  } // namespace crypto
47 } // namespace shared_model
48 
49 #endif // IROHA_SHARED_MODEL_KEYPAIR_HPP
std::string const & publicKey() const
Definition: keypair.cpp:15
Definition: keypair.hpp:19
Definition: private_key.hpp:16
Keypair(shared_model::interface::types::PublicKeyHexStringView public_key_hex, const PrivateKeyType &private_key)
Definition: keypair.cpp:36
std::string toString() const override
Definition: keypair.cpp:28
bool operator==(const Keypair &keypair) const override
Definition: keypair.cpp:23
Definition: model_primitive.hpp:22
Definition: command_executor.hpp:12
const PrivateKeyType & privateKey() const
Definition: keypair.cpp:19