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

XXH3 implementation out of date with xxHash 0.8.0 #4

Open
mattmook opened this issue Jun 28, 2021 · 3 comments
Open

XXH3 implementation out of date with xxHash 0.8.0 #4

mattmook opened this issue Jun 28, 2021 · 3 comments

Comments

@mattmook
Copy link

mattmook commented Jun 28, 2021

With xxHash v0.8.0, XXH3 is now stable (see https://github.com/Cyan4973/xxHash/releases/tag/v0.8.0).

Looking at the test vectors in this library, it looks as though it is out of sync with the latest tag. Is there a plan to upgrade?

For example, for xxHash3-64, for an empty input and zero-value seed we would expect a hash of 2D06800538D394C2.
https://github.com/Cyan4973/xxHash/blob/94e5f23e736f2bb67ebdf90727353e65344f9fc0/xxhsum.c#L1246

Instead the current implementation in this library returns 0000000000000000.

XCTAssertEqual(XXH3.digest64Hex("").lowercased(), "0000000000000000")

@daisuke-t-jp
Copy link
Owner

@mattmook
As you pointed out, the XXH3 included in this package is an older, test version.

At this time, there are no plans to support the new XXH3.

Regards.

@mleonhard
Copy link

Hi Diasuke, I hope you will reconsider. I wish to use xxHash3 to build a bloom filter and then send it through the network to non-Swift server. I need a compatible version of the algorithm so the bloom filter can work.

@mattmook
Copy link
Author

@mleonhard probably not the answer you are directly looking for, I have a more recent version working under Kotlin Multiplatform that compiles to an iOS framework at https://github.com/appmattus/crypto/tree/main/cryptohash

Certainly there is a lot more work on my side to automatically publish the iOS framework to SPM or cocoapods to make my project easier to adopt.

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

3 participants