fix(baseN, hex, sha256): const string & -> string_view

This commit is contained in:
2024-09-16 09:57:31 +03:00
parent 2a89a56011
commit 46ae1a5872
6 changed files with 21 additions and 19 deletions

View File

@ -1,11 +1,12 @@
#pragma once
#include <cstdint>
#include <span>
#include <vector>
#define SHA256_DIGEST_LENGTH 32
namespace hash {
void sha256(const uint8_t *data, uint64_t data_size, uint8_t *hash) noexcept;
std::vector<uint8_t> sha256(const std::vector<uint8_t> &data) noexcept;
std::vector<uint8_t> sha256(std::span<const uint8_t> data) noexcept;
}