//
// Created by Dan Crosby on 10/13/22.
//

#ifndef EAGLE0_BYTEHASHER_HPP
#define EAGLE0_BYTEHASHER_HPP

#include <cstdint>

constexpr uint64_t FNV_PRIME = 0x100000001b3;
constexpr uint64_t FNV_OFFSET_BASIS = 0xcbf29ce484222325;

static inline auto MixIn(uint64_t& hash, const uint8_t byte) {
    hash = hash * FNV_PRIME;
    hash = hash ^ byte;
}

#endif  // EAGLE0_BYTEHASHER_HPP
