updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -26,6 +26,57 @@
|
||||
#include "utils/error.hpp"
|
||||
|
||||
namespace repertory::utils::hash {
|
||||
auto create_hash_blake2b_32(std::string_view data) -> hash_32_t {
|
||||
return create_hash_blake2b_t<hash_32_t>(
|
||||
reinterpret_cast<const unsigned char *>(data.data()), data.size());
|
||||
}
|
||||
|
||||
auto create_hash_blake2b_32(std::wstring_view data) -> hash_32_t {
|
||||
return create_hash_blake2b_t<hash_32_t>(
|
||||
reinterpret_cast<const unsigned char *>(data.data()),
|
||||
data.size() * sizeof(wchar_t));
|
||||
}
|
||||
|
||||
auto create_hash_blake2b_32(const data_buffer &data) -> hash_32_t {
|
||||
return create_hash_blake2b_t<hash_32_t>(
|
||||
reinterpret_cast<const unsigned char *>(data.data()),
|
||||
data.size() * sizeof(data_buffer::value_type));
|
||||
}
|
||||
|
||||
auto create_hash_blake2b_64(std::string_view data) -> hash_64_t {
|
||||
return create_hash_blake2b_t<hash_64_t>(
|
||||
reinterpret_cast<const unsigned char *>(data.data()), data.size());
|
||||
}
|
||||
|
||||
auto create_hash_blake2b_64(std::wstring_view data) -> hash_64_t {
|
||||
return create_hash_blake2b_t<hash_64_t>(
|
||||
reinterpret_cast<const unsigned char *>(data.data()),
|
||||
data.size() * sizeof(wchar_t));
|
||||
}
|
||||
|
||||
auto create_hash_blake2b_64(const data_buffer &data) -> hash_64_t {
|
||||
return create_hash_blake2b_t<hash_64_t>(
|
||||
reinterpret_cast<const unsigned char *>(data.data()),
|
||||
data.size() * sizeof(data_buffer::value_type));
|
||||
}
|
||||
|
||||
auto create_hash_blake2b_128(std::string_view data) -> hash_128_t {
|
||||
return create_hash_blake2b_t<hash_128_t>(
|
||||
reinterpret_cast<const unsigned char *>(data.data()), data.size());
|
||||
}
|
||||
|
||||
auto create_hash_blake2b_128(std::wstring_view data) -> hash_128_t {
|
||||
return create_hash_blake2b_t<hash_128_t>(
|
||||
reinterpret_cast<const unsigned char *>(data.data()),
|
||||
data.size() * sizeof(wchar_t));
|
||||
}
|
||||
|
||||
auto create_hash_blake2b_128(const data_buffer &data) -> hash_128_t {
|
||||
return create_hash_blake2b_t<hash_128_t>(
|
||||
reinterpret_cast<const unsigned char *>(data.data()),
|
||||
data.size() * sizeof(data_buffer::value_type));
|
||||
}
|
||||
|
||||
auto create_hash_blake2b_256(std::string_view data) -> hash_256_t {
|
||||
return create_hash_blake2b_t<hash_256_t>(
|
||||
reinterpret_cast<const unsigned char *>(data.data()), data.size());
|
||||
|
||||
Reference in New Issue
Block a user