diff options
author | Oran Juice <oranjuices@hotmail.com> | 2014-10-07 12:49:36 +0530 |
---|---|---|
committer | Oran Juice <oranjuices@hotmail.com> | 2014-10-07 12:49:36 +0530 |
commit | 9875f5b875479d88a17a2d657e3f84d904364314 (patch) | |
tree | d70c7241da2a39c9f86a07862758e0b94260ecce /src/mnemonics/language_base.h | |
parent | Merge pull request #170 (diff) | |
download | monero-9875f5b875479d88a17a2d657e3f84d904364314.tar.xz |
Variable unique prefix lengths for seed
Diffstat (limited to '')
-rw-r--r-- | src/mnemonics/language_base.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mnemonics/language_base.h b/src/mnemonics/language_base.h index 0f1062b09..06815e39d 100644 --- a/src/mnemonics/language_base.h +++ b/src/mnemonics/language_base.h @@ -45,7 +45,6 @@ */
namespace Language
{
- const int unique_prefix_length = 4; /*!< Length of the prefix of all words guaranteed to be unique */
/*!
* \class Base
* \brief A base language class which all languages have to inherit from for
@@ -58,7 +57,7 @@ namespace Language std::unordered_map<std::string, uint32_t> *word_map; /*!< hash table to find word's index */
std::unordered_map<std::string, uint32_t> *trimmed_word_map; /*!< hash table to find word's trimmed index */
std::string language_name; /*!< Name of language */
- int trim_length; /*!< Number of unique starting characters to trim the wordlist to when matching */
+ uint32_t unique_prefix_length; /*!< Number of unique starting characters to trim the wordlist to when matching */
/*!
* \brief Populates the word maps after the list is ready.
*/
@@ -85,6 +84,7 @@ namespace Language word_list = new std::vector<std::string>;
word_map = new std::unordered_map<std::string, uint32_t>;
trimmed_word_map = new std::unordered_map<std::string, uint32_t>;
+ unique_prefix_length = 4;
}
/*!
* \brief Returns a pointer to the word list.
@@ -122,9 +122,9 @@ namespace Language * \brief Returns the number of unique starting characters to be used for matching.
* \return Number of unique starting characters.
*/
- int get_trim_length() const
+ uint32_t get_unique_prefix_length() const
{
- return trim_length;
+ return unique_prefix_length;
}
};
}
|