Keep in mind that this method is
significantly slower than to simply test each character permutation.
You see each character at the start of the string (from left) converts to a much bigger integer than any character from the end of the string. So even the difference between 1 char missing becomes huge.
Take the following example:
Ky**DfuvLpt8eSb8EQzhZwDCQeCaycKeAoxJMY8pfPZXmn3uB38R
Even though only 2 characters are missing the difference between Ky11Df... and KyzzDf... as integer is
13491826005831086771641399365157222283117801812915393869332949675679483454208
While the permutations are only 3364.
The program I'm using is able to skip-count so I think that can mitigate the speed penalty. So I can jump through each next value, adding the huge difference to the previous each time to get the next.