2 #include "ypc/common/byte.h"
12 template <
typename BytesType>
13 static uint32_t hash_256(
const BytesType &msg, BytesType &sig) {
15 return hash_t::hash_256(msg.data(), msg.size(), sig.data());
18 static uint32_t hash_256(
const uint8_t *msg, uint32_t msg_size,
20 return hash_t::hash_256(msg, msg_size, hash);
23 static uint32_t get_msg_hash_size() {
return hash_t::get_msg_hash_size(); }
24 static uint32_t msg_hash(
const uint8_t *raw_msg, uint32_t msg_size,
25 uint8_t *hash, uint32_t hash_size) {
26 return hash_t::msg_hash(raw_msg, msg_size, hash, hash_size);
28 template <
typename BytesType>
29 static uint32_t msg_hash(
const BytesType &raw_msg, BytesType &hash) {
30 hash = BytesType(hash_t::get_msg_hash_size());
31 return hash_t::msg_hash(raw_msg.data(), raw_msg.size(), hash.data(),