mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-24 18:48:01 +02:00
HashEncode64 improvements
This commit is contained in:
parent
cf40ef26ee
commit
cfaeb875f8
1 changed files with 6 additions and 5 deletions
|
@ -4676,13 +4676,14 @@ String BfTypeUtils::HashEncode64(uint64 val)
|
|||
outStr.Append('_');
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
|
||||
while (val > 0)
|
||||
{
|
||||
int charIdx = (int)((val >> (i * 6)) & 0x3F) - 1;
|
||||
if (charIdx != -1)
|
||||
outStr.Append(cHash64bToChar[charIdx]);
|
||||
int charIdx = val % 0x3F;
|
||||
val /= 0x3F;
|
||||
outStr.Append(cHash64bToChar[charIdx]);
|
||||
}
|
||||
|
||||
return outStr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue