Skip to content
FutureBlitz

    Install

    Import std.crypto.checksums

    XxHash

    std.crypto.checksums

    class

    Public Class XxHash

    XXH3's 64-bit hash of what's added in turn, with a seed, so the same data hashes differently under different seeds.

    Examples

    Local hash = XxHash.Hash("abc")
    Expect(hash == XxHash.Hash("abc".Bytes))
    Expect(hash != XxHash.Hash("abc", 1))

    std/crypto/checksums.fb, line 81

    • Public New(seed: UInt64 = 0) constructor #

      A new XxHash, of nothing, with seed.

    • Public Static Method Hash(data: UInt8[], seed: UInt64 = 0): UInt64 static method #

      XXH3's 64-bit hash of data, with seed.

    • Public Static Method Hash(text: String, seed: UInt64 = 0): UInt64 static method #

      XXH3's 64-bit hash of text's UTF-8 bytes, with seed.

    • Public Method Add(data: UInt8[]) method #

      Adds data to what it hashes.

    • Public Method Add(text: String) method #

      Adds text's UTF-8 bytes to what it hashes.

    • Public Method Finish(): UInt64 method #

      The hash of what was added, after which it starts again, empty, with its seed.

    Report an issue with this page or with FutureBlitz on GitHub.