Kagome
Polkadot Runtime Engine in C++17
twox.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CRYPTO_TWOX_HPP
7 #define KAGOME_CRYPTO_TWOX_HPP
8 
9 #include "common/blob.hpp"
10 
11 namespace kagome::crypto {
12 
13  // TODO(warchant): PRE-357 refactor to span
14 
15  common::Hash64 make_twox64(gsl::span<const uint8_t> buf);
16 
17  common::Hash128 make_twox128(gsl::span<const uint8_t> buf);
18 
19  common::Hash256 make_twox256(gsl::span<const uint8_t> buf);
20 
21 } // namespace kagome::crypto
22 
23 #endif // KAGOME_CRYPTO_TWOX_HPP
Blob< 32 > Hash256
Definition: blob.hpp:230
Blob< 16 > Hash128
Definition: blob.hpp:229
void make_twox64(const uint8_t *in, uint32_t len, uint8_t *out)
Definition: twox.cpp:12
Blob< 8 > Hash64
Definition: blob.hpp:228
void make_twox256(const uint8_t *in, uint32_t len, uint8_t *out)
Definition: twox.cpp:40
void make_twox128(const uint8_t *in, uint32_t len, uint8_t *out)
Definition: twox.cpp:25