hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::KeysManager Class Referenceabstract

#include "keys_manager.hpp"

Inheritance diagram for iroha::KeysManager:
Inheritance graph
Collaboration diagram for iroha::KeysManager:
Collaboration graph

Public Member Functions

virtual ~KeysManager ()=default
 
virtual bool createKeys (const boost::optional< std::string > &pass_phrase)=0
 
virtual iroha::expected::Result< shared_model::crypto::Keypair, std::string > loadKeys (const boost::optional< std::string > &pass_phrase)=0
 

Detailed Description

Interface provides facilities to create and store keypair on disk.

Constructor & Destructor Documentation

◆ ~KeysManager()

virtual iroha::KeysManager::~KeysManager ( )
virtualdefault

Member Function Documentation

◆ createKeys()

virtual bool iroha::KeysManager::createKeys ( const boost::optional< std::string > &  pass_phrase)
pure virtual

Create keys of a new keypair and store them on disk. If pass phrase is provided, the private key is encrypted.

Parameters
pass_phrase(optional) used for private key encryption
Returns
false if keys creation failed

Implemented in iroha::KeysManagerImpl.

◆ loadKeys()

virtual iroha::expected::Result<shared_model::crypto::Keypair, std::string> iroha::KeysManager::loadKeys ( const boost::optional< std::string > &  pass_phrase)
pure virtual

Load keys associated with the manager, then validate loaded keypair by signing and verifying the signature of a test message.

Parameters
pass_phrase(optional) is used to decrypt the private key
Returns
error if no keypair found locally, or in case of verification failure. Otherwise - the keypair will be returned

Implemented in iroha::KeysManagerImpl.


The documentation for this class was generated from the following file: