passhash
passhash copied to clipboard
Unrecoverable error in algo
For all who wants to implement this in other languages: there is error in one algorithm.
Error is in function convertToDigits:
s += String.fromCharCode((seed + sInput.charCodeAt(i)) % 10 + 48);
It takes the char code of last digit character and not of current non-digit character.
Right variant must be as:
s += String.fromCharCode((seed + sInput.charCodeAt(i+j)) % 10 + 48);
Almost same error is in removeSpecialCharacters.
Unfortunally, too much people already has hashes with that errors, therefore the best choice do not repair it.
Also, I'm inform that I'm write C realization: Blake-R/c_password_hasher@eb72bcd