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 ()=0
 
virtual bool createKeys (const std::string &pass_phrase)=0
 
virtual boost::optional< shared_model::crypto::KeypairloadKeys ()=0
 
virtual boost::optional< shared_model::crypto::KeypairloadKeys (const std::string &pass_phrase)=0
 

Detailed Description

Interface provides facilities to create and store keypair on disk.

Constructor & Destructor Documentation

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

Member Function Documentation

virtual bool iroha::KeysManager::createKeys ( )
pure virtual

Create keys of a new keypair and store them on disk

Returns
false if keys creation was failed

Implemented in iroha::KeysManagerImpl.

virtual bool iroha::KeysManager::createKeys ( const std::string pass_phrase)
pure virtual

Create keys of a new keypair and store it encrypted on disk

Parameters
pass_phraseis used for private key encryption
Returns
false if keys creation was failed

Implemented in iroha::KeysManagerImpl.

virtual boost::optional<shared_model::crypto::Keypair> iroha::KeysManager::loadKeys ( )
pure virtual

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

Returns
nullopt if no keypair found locally, or in case of verification failure. Otherwise - the keypair will be returned

Implemented in iroha::KeysManagerImpl.

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

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

Parameters
pass_phraseis a password for decryption
Returns
nullopt 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: