#include "keys_manager_impl.hpp"
◆ KeysManagerImpl() [1/2]
| iroha::KeysManagerImpl::KeysManagerImpl |
( |
const std::string & |
account_id, |
|
|
const boost::filesystem::path & |
path_to_keypair, |
|
|
logger::LoggerPtr |
log |
|
) |
| |
Initialize key manager for a specific account
- Parameters
-
| account_id | - fully qualified account id, e.g. admin |
- Test:
- Parameters
-
| path_to_keypair | - path to directory that contains priv and pub key of an account |
| log | to print progress |
◆ KeysManagerImpl() [2/2]
| iroha::KeysManagerImpl::KeysManagerImpl |
( |
const std::string |
account_id, |
|
|
logger::LoggerPtr |
log |
|
) |
| |
Initialize key manager for a specific account
- Parameters
-
| account_id | - fully qualified account id, e.g. admin |
- Test:
- Parameters
-
Here we use an empty string as a default value of path to file, since there are usages of KeysManagerImpl with path passed as a part of account_id.
◆ createKeys()
| bool iroha::KeysManagerImpl::createKeys |
( |
const boost::optional< std::string > & |
pass_phrase | ) |
|
|
overridevirtual |
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
Implements iroha::KeysManager.
◆ loadKeys()
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
Implements iroha::KeysManager.
◆ kPrivateKeyExtension
| const std::string iroha::KeysManagerImpl::kPrivateKeyExtension = ".priv" |
|
static |
◆ kPublicKeyExtension
| const std::string iroha::KeysManagerImpl::kPublicKeyExtension = ".pub" |
|
static |
The documentation for this class was generated from the following files: