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

Fix password length for utf-8 encoded chars (http://zargony.com/2009/07/... #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

haploke
Copy link

@haploke haploke commented Dec 1, 2014

http://zargony.com/2009/07/24/ruby-1-9-and-file-encodings

UTF-8 chars (like é, è, ç) are encoded by a double byte in stead of a normal sized 1 byte char. So, it is better to use the bytesize of the password string in stead of the length of the string, otherwise the password strings loose some bytes at the end.

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