Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly stronger hash function in ui_hash_from_string() #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

al13n321
Copy link

The original hash function had a few collisions on the dictionary of English words, e.g. "hot"-"iOS". The hash doesn't change e.g. if a character is incremented and the next character is decreased by 33, e.g. "At"-"BS". There's maybe a not-completely-negligible chance that something like this would accidentally happen in practice, so here's a simple tweak to avoid it - just change 33 to 257.

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

Successfully merging this pull request may close these issues.

1 participant