python-xxhash icon indicating copy to clipboard operation
python-xxhash copied to clipboard

Bug: hashlib parity

Open 0az opened this issue 5 years ago • 2 comments

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.

0az avatar Oct 20 '20 18:10 0az

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

ifduyue avatar Dec 01 '20 02:12 ifduyue

.name attribute trailing zero byte fixed in d97ea92dc020d9f3e916233507d661477572532a

ifduyue avatar Apr 15 '21 03:04 ifduyue