1
0
Fork 0
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:
Henrik Hautakoski 2020-01-15 16:55:11 +01:00
parent fd2b4a8368
commit 418949f26f
2 changed files with 6 additions and 2 deletions

View file

@ -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);