daisuke-t-jp / xxHash-Swift

xxHash framework in Swift.
https://cocoapods.org/pods/xxHash-Swift
MIT License
28 stars 6 forks source link

XXH3 implementation out of date with xxHash 0.8.0 #4

Open mattmook opened 3 years ago

mattmook commented 3 years ago

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. https://github.com/daisuke-t-jp/xxHash-Swift/blob/1fbd877ba76e9b0b6611f4b2d3d02adb254bb4bd/Tests/xxHashTests/xxHashTests.swift#L464

daisuke-t-jp commented 3 years ago

@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 commented 1 year ago

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 commented 1 year ago

@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.