mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-06-17 03:50:03 +02:00
src/string.cpp: in l33twords() "l" is a bit special. so we set "l" to "1"
This commit is contained in:
parent
fd2b4a8368
commit
418949f26f
2 changed files with 6 additions and 2 deletions
|
|
@ -138,10 +138,14 @@ static void _l33t(strlist_t& list, const std::string& a, int pos) {
|
|||
}
|
||||
}
|
||||
|
||||
strlist_t l33twords(const std::string& str) {
|
||||
strlist_t l33twords(std::string str) {
|
||||
|
||||
strlist_t list;
|
||||
|
||||
// "l" is abit special and are not included in base58 so we set it to 1.
|
||||
// All other characters in "l33t" are valid.
|
||||
std::transform(str.begin(), str.end(), str.begin(), [](char c){ return c == 'l' ? '1' : c; });
|
||||
|
||||
// Store the original string as the first in list.
|
||||
list.push_back(str);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue