updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
@ -92,32 +92,32 @@ auto create_hash_blake2b_t(const unsigned char *data,
|
||||
crypto_generichash_blake2b_state state{};
|
||||
auto res = crypto_generichash_blake2b_init(&state, nullptr, 0U, hash.size());
|
||||
if (res != 0) {
|
||||
throw utils::error::create_exception({
|
||||
function_name,
|
||||
"failed to initialize blake2b",
|
||||
std::to_string(hash.size() * 8U),
|
||||
std::to_string(res),
|
||||
});
|
||||
throw utils::error::create_exception(function_name,
|
||||
{
|
||||
"failed to initialize blake2b",
|
||||
std::to_string(hash.size() * 8U),
|
||||
std::to_string(res),
|
||||
});
|
||||
}
|
||||
|
||||
res = crypto_generichash_blake2b_update(&state, data, data_size);
|
||||
if (res != 0) {
|
||||
throw utils::error::create_exception({
|
||||
function_name,
|
||||
"failed to update blake2b",
|
||||
std::to_string(hash.size() * 8U),
|
||||
std::to_string(res),
|
||||
});
|
||||
throw utils::error::create_exception(function_name,
|
||||
{
|
||||
"failed to update blake2b",
|
||||
std::to_string(hash.size() * 8U),
|
||||
std::to_string(res),
|
||||
});
|
||||
}
|
||||
|
||||
res = crypto_generichash_blake2b_final(&state, hash.data(), hash.size());
|
||||
if (res != 0) {
|
||||
throw utils::error::create_exception({
|
||||
function_name,
|
||||
"failed to finalize blake2b",
|
||||
std::to_string(hash.size() * 8U),
|
||||
std::to_string(res),
|
||||
});
|
||||
throw utils::error::create_exception(function_name,
|
||||
{
|
||||
"failed to finalize blake2b",
|
||||
std::to_string(hash.size() * 8U),
|
||||
std::to_string(res),
|
||||
});
|
||||
}
|
||||
|
||||
return hash;
|
||||
|
Reference in New Issue
Block a user