1
0
mirror of https://github.com/GOSTSec/vanitygen synced 2025-02-07 12:24:20 +00:00

Fix case-insensitive search for O, I, and l characters.

This commit is contained in:
samr7 2012-07-26 00:19:27 -07:00
parent c21e99a58b
commit 5dc518a683

View File

@ -1511,9 +1511,9 @@ static const unsigned char b58_case_map[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 105, 1, 1, 0, 1, 1, 111,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 76, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
};
@ -1531,6 +1531,10 @@ prefix_case_iter_init(prefix_case_iter_t *cip, const char *pfx)
cip->ci_prefix[i] = pfx[i];
continue;
}
if (b58_case_map[(int)pfx[i]] > 1) {
cip->ci_prefix[i] = b58_case_map[(int)pfx[i]];
continue;
}
cip->ci_prefix[i] = pfx[i] | 0x20;
cip->ci_case_map[(int)cip->ci_nbits] = i;
cip->ci_nbits++;