fix(sha256): define DIGEST_LENGTH removed
This commit is contained in:
@ -4,9 +4,8 @@
|
|||||||
#include <span>
|
#include <span>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define SHA256_DIGEST_LENGTH 32
|
namespace hash
|
||||||
|
{
|
||||||
namespace hash {
|
|
||||||
void sha256(const uint8_t *data, uint64_t data_size, uint8_t *hash) noexcept;
|
void sha256(const uint8_t *data, uint64_t data_size, uint8_t *hash) noexcept;
|
||||||
std::vector<uint8_t> sha256(std::span<const uint8_t> data) noexcept;
|
std::vector<uint8_t> sha256(std::span<const uint8_t> data) noexcept;
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ namespace hash
|
|||||||
}
|
}
|
||||||
std::vector<uint8_t> sha256(std::span<const uint8_t> data) noexcept
|
std::vector<uint8_t> sha256(std::span<const uint8_t> data) noexcept
|
||||||
{
|
{
|
||||||
std::vector<uint8_t> hash(SHA256_DIGEST_LENGTH);
|
std::vector<uint8_t> hash(32);
|
||||||
sha256(data.data(), data.size(), hash.data());
|
sha256(data.data(), data.size(), hash.data());
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user