Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Unrecoverable error in algo #3

Open
blake-r opened this issue Aug 2, 2012 · 0 comments
Open

Unrecoverable error in algo #3

blake-r opened this issue Aug 2, 2012 · 0 comments

Comments

@blake-r
Copy link

blake-r commented Aug 2, 2012

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant