Kagome
Polkadot Runtime Engine in C++17
kagome::crypto::Bip39ProviderImpl Class Reference

#include <bip39_provider_impl.hpp>

Inheritance diagram for kagome::crypto::Bip39ProviderImpl:
Collaboration diagram for kagome::crypto::Bip39ProviderImpl:

Public Member Functions

 ~Bip39ProviderImpl () override=default
 
 Bip39ProviderImpl (std::shared_ptr< Pbkdf2Provider > pbkdf2_provider)
 
outcome::result< std::vector< uint8_t > > calculateEntropy (const std::vector< std::string > &word_list) const override
 calculates entropy from mnemonic More...
 
outcome::result< bip39::Bip39SeedmakeSeed (gsl::span< const uint8_t > entropy, std::string_view password) const override
 makes seed from entropy More...
 
outcome::result< bip39::Bip39SeedgenerateSeed (std::string_view mnemonic_phrase) const override
 
- Public Member Functions inherited from kagome::crypto::Bip39Provider
virtual ~Bip39Provider ()=default
 

Private Attributes

std::shared_ptr< Pbkdf2Providerpbkdf2_provider_
 
bip39::Dictionary dictionary_
 
log::Logger logger_
 

Detailed Description

Definition at line 16 of file bip39_provider_impl.hpp.

Constructor & Destructor Documentation

kagome::crypto::Bip39ProviderImpl::~Bip39ProviderImpl ( )
overridedefault
kagome::crypto::Bip39ProviderImpl::Bip39ProviderImpl ( std::shared_ptr< Pbkdf2Provider pbkdf2_provider)
explicit

Definition at line 13 of file bip39_provider_impl.cpp.

Member Function Documentation

outcome::result< std::vector< uint8_t > > kagome::crypto::Bip39ProviderImpl::calculateEntropy ( const std::vector< std::string > &  word_list) const
overridevirtual

calculates entropy from mnemonic

Parameters
correctmnemonic word list
Returns
entropy value

Implements kagome::crypto::Bip39Provider.

Definition at line 20 of file bip39_provider_impl.cpp.

outcome::result< bip39::Bip39Seed > kagome::crypto::Bip39ProviderImpl::generateSeed ( std::string_view  mnemonic_phrase) const
overridevirtual

Implements kagome::crypto::Bip39Provider.

Definition at line 56 of file bip39_provider_impl.cpp.

outcome::result< bip39::Bip39Seed > kagome::crypto::Bip39ProviderImpl::makeSeed ( gsl::span< const uint8_t >  entropy,
std::string_view  password 
) const
overridevirtual

makes seed from entropy

Parameters
entropyentropy array
Returns
seed bytes

Implements kagome::crypto::Bip39Provider.

Definition at line 43 of file bip39_provider_impl.cpp.

Member Data Documentation

bip39::Dictionary kagome::crypto::Bip39ProviderImpl::dictionary_
private

Definition at line 34 of file bip39_provider_impl.hpp.

log::Logger kagome::crypto::Bip39ProviderImpl::logger_
private

Definition at line 35 of file bip39_provider_impl.hpp.

std::shared_ptr<Pbkdf2Provider> kagome::crypto::Bip39ProviderImpl::pbkdf2_provider_
private

Definition at line 33 of file bip39_provider_impl.hpp.


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