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

Bug: hashlib parity #39

Open
0az opened this issue Oct 20, 2020 · 2 comments
Open

Bug: hashlib parity #39

0az opened this issue Oct 20, 2020 · 2 comments

Comments

@0az
Copy link

0az commented Oct 20, 2020

For parity with hashlib in Python 3.8/9, xxh32/xxh64/etc need to accept a keyword argument string, and a boolean keyword argument usedforsecurity.

https://github.com/python/typeshed/blob/04c74640f049a658f0099f4785452f5f46ec518b/stdlib/3/hashlib.pyi#L7

In addition, the .name attribute on the streaming hashes all return Python strings with an extra null terminator, which I believe is a bug stemming from using sizeof("XXH32"), etc.

I can write a PR for the latter bug later this week, along with a PR for type stubs that I'm working on.

@ifduyue
Copy link
Owner

ifduyue commented Dec 1, 2020

@0az Sorry I just see this. Please go ahead.

ifduyue added a commit that referenced this issue Apr 15, 2021
@ifduyue
Copy link
Owner

ifduyue commented Apr 15, 2021

.name attribute trailing zero byte fixed in d97ea92

ifduyue added a commit that referenced this issue Apr 15, 2021
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

2 participants