openMSX
tiger.hh
Go to the documentation of this file.
1 
15 #ifndef TIGER_H
16 #define TIGER_H
17 
18 #include <string>
19 #include <cstdint>
20 
21 namespace openmsx {
22 
27 struct TigerHash
28 {
29  std::string toString() const;
30  union {
31  uint64_t h64[3];
32  uint8_t h8[24];
33  };
34 };
35 
43 void tiger(const uint8_t* str, size_t length, TigerHash& result);
44 
50 void tiger_int(const TigerHash& h0, const TigerHash& h1, TigerHash& result);
51 
60 void tiger_leaf(/*const*/ uint8_t data[1024], TigerHash& result);
61 
62 } // namespace openmsx
63 
64 #endif
T length(const vecN< N, T > &x)
Definition: gl_vec.hh:343
This struct represents the result of a tiger-hash.
Definition: tiger.hh:27
uint64_t h64[3]
Definition: tiger.hh:31
void tiger(const uint8_t *str, size_t length, TigerHash &result)
Generic function to calculate a tiger-hash.
Definition: tiger.cc:671
void tiger_int(const TigerHash &h0, const TigerHash &h1, TigerHash &result)
Use for tiger-tree internal node hash calculations.
Definition: tiger.cc:709
constexpr auto data(C &c) -> decltype(c.data())
Definition: span.hh:69
void tiger_leaf(uint8_t data[1024], TigerHash &result)
Use for tiger-tree leaf node hash calculations.
Definition: tiger.cc:729
std::string toString() const
Definition: tiger.cc:9
uint8_t h8[24]
Definition: tiger.hh:32
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5