mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
23 lines
428 B
C++
23 lines
428 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
namespace tt::hash {
|
|
|
|
/**
|
|
* Implementation of DJB2 hashing algorithm.
|
|
* @param[in] str the string to calculate the hash for
|
|
* @return the hash
|
|
*/
|
|
uint32_t djb2(const char* str);
|
|
|
|
/**
|
|
* Implementation of DJB2 hashing algorithm.
|
|
* @param[in] data the bytes to calculate the hash for
|
|
* @return the hash
|
|
*/
|
|
uint32_t djb2(const void* data, size_t length);
|
|
|
|
} // namespace
|