Monero
Loading...
Searching...
No Matches
electrum-words.h File Reference

Mnemonic seed generation and wallet restoration from them. More...

#include <string>
#include <cstdint>
#include "crypto/crypto.h"
Include dependency graph for electrum-words.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  epee
 TODO: (mj-xmr) This will be reduced in an another PR.
namespace  crypto
 crypto namespace.
namespace  crypto::ElectrumWords
 Mnemonic seed word generation and wallet restoration helper functions.

Functions

bool crypto::ElectrumWords::words_to_bytes (const epee::wipeable_string &words, epee::wipeable_string &dst, size_t len, bool duplicate, std::string &language_name)
 Converts seed words to bytes (secret key).
bool crypto::ElectrumWords::words_to_bytes (const epee::wipeable_string &words, crypto::secret_key &dst, std::string &language_name)
 Converts seed words to bytes (secret key).
bool crypto::ElectrumWords::bytes_to_words (const char *src, size_t len, epee::wipeable_string &words, const std::string &language_name)
 Converts bytes (secret key) to seed words.
bool crypto::ElectrumWords::bytes_to_words (const crypto::secret_key &src, epee::wipeable_string &words, const std::string &language_name)
 Converts bytes (secret key) to seed words.
void crypto::ElectrumWords::get_language_list (std::vector< std::string > &languages, bool english)
 Gets a list of seed languages that are supported.
bool crypto::ElectrumWords::get_is_old_style_seed (const epee::wipeable_string &seed)
 Tells if the seed passed is an old style seed or not.
std::string crypto::ElectrumWords::get_english_name_for (const std::string &name)
 Returns the name of a language in English.
bool crypto::ElectrumWords::is_valid_language (const std::string &language)

Variables

const int crypto::ElectrumWords::seed_length = 24
const std::string crypto::ElectrumWords::old_language_name = "EnglishOld"

Detailed Description

Mnemonic seed generation and wallet restoration from them.

This file and its cpp file are for translating Electrum-style word lists into their equivalent byte representations for cross-compatibility with that method of "backing up" one's wallet keys.