diff options
author | Oran Juice <oranjuices@hotmail.com> | 2014-09-28 02:29:25 +0530 |
---|---|---|
committer | Oran Juice <oranjuices@hotmail.com> | 2014-09-28 02:29:25 +0530 |
commit | 8f587ba1c8044ed6face883d8f50cd43e27484e3 (patch) | |
tree | 2b7afff874d80661be6abd0a971f7dcf5f347a29 /src/mnemonics/electrum-words.h | |
parent | Doxygen comments in (diff) | |
download | monero-8f587ba1c8044ed6face883d8f50cd43e27484e3.tar.xz |
CRC Checksum for word seed. Gives a new 25 word seed with checksum if one without checksum is passed. Doxygen comment fix.
Diffstat (limited to 'src/mnemonics/electrum-words.h')
-rw-r--r-- | src/mnemonics/electrum-words.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/mnemonics/electrum-words.h b/src/mnemonics/electrum-words.h index 687ac76cf..ffe2fdefb 100644 --- a/src/mnemonics/electrum-words.h +++ b/src/mnemonics/electrum-words.h @@ -43,18 +43,20 @@ /*! * \namespace crypto + * + * \brief crypto namespace. */ namespace crypto { /*! - * \namespace ElectrumWords + * \namespace crypto::ElectrumWords * - * \brief Mnemonic seed word generation and wallet restoration. + * \brief Mnemonic seed word generation and wallet restoration helper functions. */ namespace ElectrumWords { /*! - * \brief Called to initialize it work with a word list file. + * \brief Called to initialize it to work with a word list file. * \param language Language of the word list file. * \param old_word_list Whether it is to use the old style word list file. */ @@ -71,21 +73,28 @@ namespace crypto /*! * \brief Converts bytes (secret key) to seed words. * \param src Secret key - * \param words Space separated words get copied here. - * \return Whether it was successful or not. Unsuccessful if wrong key size. + * \param words Space delimited concatenated words get written here. + * \return true if successful false if not. Unsuccessful if wrong key size. */ bool bytes_to_words(const crypto::secret_key& src, std::string& words); /*! * \brief Gets a list of seed languages that are supported. - * \param languages The list gets added to this. + * \param languages The list of languages gets added to this vector. */ void get_language_list(std::vector<std::string> &languages); /*! * \brief If the module is currenly using an old style word list. - * \return Whether it is currenly using an old style word list. + * \return true if it is currenly using an old style word list false if not. + */ + bool get_is_old_style_word_list(); + + /*! + * \brief Tells if the seed passed is an old style seed or not. + * \param seed The seed to check (a space delimited concatenated word list) + * \return true if the seed passed is a old style seed false if not. */ - bool get_is_old_style_mnemonics(); + bool get_is_old_style_seed(const std::string &seed); } } |