How to use the xxhash.xxh3_64_intdigest function in xxhash

To help you get started, we’ve selected a few xxhash examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ifduyue / python-xxhash / tests / test_xxh3_64.py View on Github external
def test_xxh3_64_intdigest(self):
        self.assertEqual(xxhash.xxh3_64_intdigest('a'), 9860746555294122439)
        self.assertEqual(xxhash.xxh3_64_intdigest('a', 0), 9860746555294122439)
        self.assertEqual(xxhash.xxh3_64_intdigest('a', 1), 13320045329392605694)
        self.assertEqual(xxhash.xxh3_64_intdigest('a', 2**64-1), 14273714421385330224)
github ifduyue / python-xxhash / tests / test_xxh3_64.py View on Github external
def test_xxh3_64_intdigest(self):
        self.assertEqual(xxhash.xxh3_64_intdigest('a'), 9860746555294122439)
        self.assertEqual(xxhash.xxh3_64_intdigest('a', 0), 9860746555294122439)
        self.assertEqual(xxhash.xxh3_64_intdigest('a', 1), 13320045329392605694)
        self.assertEqual(xxhash.xxh3_64_intdigest('a', 2**64-1), 14273714421385330224)
github ifduyue / python-xxhash / tests / test_xxh3_64.py View on Github external
self.assertEqual(a.digest(), b.digest())
        self.assertEqual(a.intdigest(), xxhash.xxh3_64_intdigest(s, seed=1))
        self.assertEqual(a.intdigest(), xxhash.xxh3_64_intdigest(s, seed=2**64+1))
        self.assertEqual(a.digest(), xxhash.xxh3_64_digest(s, seed=1))
        self.assertEqual(a.digest(), xxhash.xxh3_64_digest(s, seed=2**64+1))
        self.assertEqual(a.hexdigest(), xxhash.xxh3_64_hexdigest(s, seed=1))
        self.assertEqual(a.hexdigest(), xxhash.xxh3_64_hexdigest(s, seed=2**64+1))

        a = xxhash.xxh3_64(s, seed=2**65-1)
        b = xxhash.xxh3_64(s, seed=2**66-1)
        self.assertEqual(a.seed, b.seed)
        self.assertEqual(a.intdigest(), b.intdigest())
        self.assertEqual(a.hexdigest(), b.hexdigest())
        self.assertEqual(a.digest(), b.digest())
        self.assertEqual(a.intdigest(), xxhash.xxh3_64_intdigest(s, seed=2**65-1))
        self.assertEqual(a.intdigest(), xxhash.xxh3_64_intdigest(s, seed=2**66-1))
        self.assertEqual(a.digest(), xxhash.xxh3_64_digest(s, seed=2**65-1))
        self.assertEqual(a.digest(), xxhash.xxh3_64_digest(s, seed=2**66-1))
        self.assertEqual(a.hexdigest(), xxhash.xxh3_64_hexdigest(s, seed=2**65-1))
        self.assertEqual(a.hexdigest(), xxhash.xxh3_64_hexdigest(s, seed=2**66-1))
github ifduyue / python-xxhash / tests / test_xxh3_64.py View on Github external
def test_xxh3_64_intdigest(self):
        self.assertEqual(xxhash.xxh3_64_intdigest('a'), 9860746555294122439)
        self.assertEqual(xxhash.xxh3_64_intdigest('a', 0), 9860746555294122439)
        self.assertEqual(xxhash.xxh3_64_intdigest('a', 1), 13320045329392605694)
        self.assertEqual(xxhash.xxh3_64_intdigest('a', 2**64-1), 14273714421385330224)