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

py3 strings f*ck up generichash #93

Closed
stef opened this issue Jan 31, 2020 · 1 comment
Closed

py3 strings f*ck up generichash #93

stef opened this issue Jan 31, 2020 · 1 comment

Comments

@stef
Copy link
Owner

stef commented Jan 31, 2020

>>> import pysodium
>>> pysodium.crypto_generichash( 'salt0') == pysodium.crypto_generichash( 'salt1')
True
>>> pysodium.crypto_generichash(b'salt0') == pysodium.crypto_generichash(b'salt1')
False
>>>

observe that only the type of the salt[01] input changed from str to byte, and only for bytes it gives the correct output.

may hastur haunt the dreams of those responsible for py3 string "handling"

stef added a commit that referenced this issue Jan 31, 2020
@stef
Copy link
Owner Author

stef commented Jan 31, 2020

fixed in 06fb17f

@stef stef closed this as completed Jan 31, 2020
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

No branches or pull requests

1 participant