Restores a number tuple from hashed using the given `alphabet` index.
(hashed, alphabet)
| 52 | |
| 53 | |
| 54 | def _unhash(hashed, alphabet): |
| 55 | """Restores a number tuple from hashed using the given `alphabet` index.""" |
| 56 | number = 0 |
| 57 | len_alphabet = len(alphabet) |
| 58 | for character in hashed: |
| 59 | position = alphabet.index(character) |
| 60 | number *= len_alphabet |
| 61 | number += position |
| 62 | return number |
| 63 | |
| 64 | |
| 65 | def _reorder(string, salt): |