File tree 2 files changed +8
-10
lines changed
include/bitcoin/system/hash
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 25
25
#include < tuple>
26
26
#include < bitcoin/system/data/data.hpp>
27
27
#include < bitcoin/system/define.hpp>
28
+ #include < bitcoin/system/endian/endian.hpp>
28
29
#include < bitcoin/system/hash/functions.hpp>
29
30
30
31
namespace libbitcoin {
@@ -37,7 +38,13 @@ BC_API uint64_t siphash(const siphash_key& key,
37
38
BC_API uint64_t siphash (const half_hash& hash,
38
39
const data_slice& message) NOEXCEPT;
39
40
40
- BC_API siphash_key to_siphash_key (const half_hash& hash) NOEXCEPT;
41
+ constexpr siphash_key to_siphash_key (const half_hash& hash) NOEXCEPT
42
+ {
43
+ const auto part = split (hash);
44
+ const auto hi = from_little_endian (part.first );
45
+ const auto lo = from_little_endian (part.second );
46
+ return std::make_tuple (hi, lo);
47
+ }
41
48
42
49
} // namespace system
43
50
} // namespace libbitcoin
Original file line number Diff line number Diff line change @@ -110,14 +110,5 @@ uint64_t siphash(const half_hash& hash,
110
110
return siphash (to_siphash_key (hash), message);
111
111
}
112
112
113
- // TODO: constexpr
114
- siphash_key to_siphash_key (const half_hash& hash) NOEXCEPT
115
- {
116
- const auto part = split (hash);
117
- const auto hi = from_little_endian (part.first );
118
- const auto lo = from_little_endian (part.second );
119
- return std::make_tuple (hi, lo);
120
- }
121
-
122
113
} // namespace system
123
114
} // namespace libbitcoin
You can’t perform that action at this time.
0 commit comments