| e8555c89 Andy McCall |
1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
#ifndef TIGER_HH |
| 16 |
#define TIGER_HH |
| 17 |
|
| 18 |
#include <array> |
| 19 |
#include <cstdint> |
| 20 |
#include <span> |
| 21 |
#include <string> |
| 22 |
|
| 23 |
namespace openmsx { |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
struct TigerHash |
| 30 |
{ |
| 31 |
[[nodiscard]] std::string toString() const; |
| 32 |
union { |
| 33 |
std::array<uint64_t, 3> h64; |
| 34 |
std::array<uint8_t, 24> h8; |
| 35 |
}; |
| 36 |
}; |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
void tiger(std::span<const uint8_t> input, TigerHash& result); |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
void tiger_int(const TigerHash& h0, const TigerHash& h1, TigerHash& result); |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
void tiger_leaf(std::span<uint8_t> data, TigerHash& result); |
| 63 |
|
| 64 |
} |
| 65 |
|
| 66 |
#endif |