openMSX
tiger.hh
Go to the documentation of this file.
1
15#ifndef TIGER_HH
16#define TIGER_HH
17
18#include <array>
19#include <string>
20#include <cstdint>
21#include <span>
22
23namespace openmsx {
24
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
45void tiger(std::span<const uint8_t> input, TigerHash& result);
46
52void tiger_int(const TigerHash& h0, const TigerHash& h1, TigerHash& result);
53
62void tiger_leaf(std::span</*const*/uint8_t> data, TigerHash& result);
63
64} // namespace openmsx
65
66#endif
This file implemented 3 utility functions:
Definition Autofire.cc:9
void tiger(std::span< const uint8_t > input, TigerHash &result)
Generic function to calculate a tiger-hash.
Definition tiger.cc:680
void tiger_int(const TigerHash &h0, const TigerHash &h1, TigerHash &result)
Use for tiger-tree internal node hash calculations.
Definition tiger.cc:711
void tiger_leaf(std::span< uint8_t > data, TigerHash &result)
Use for tiger-tree leaf node hash calculations.
Definition tiger.cc:731
This struct represents the result of a tiger-hash.
Definition tiger.hh:30
std::array< uint64_t, 3 > h64
Definition tiger.hh:33
std::array< uint8_t, 24 > h8
Definition tiger.hh:34
std::string toString() const
Definition tiger.cc:12